I am doing something like this
Select::make('material_id')->required()->relationship('material', 'name')->manageOptionForm(\App\Filament\Admin\Resources\Materials\Schemas\MaterialForm::configure($schema)->getComponents())->afterStateUpdatedJs(function () {
return <<<'JS'
$set('unit_id', $get('material_id'));
JS;
}),
TextInput::make('qty')->required()->numeric()->minValue(0),
Select::make('unit_id')->disabled()->saved()->label('Unit')->relationship('material.unit', 'name'),
now this is not working as intended, giving material id in unit select, i can do like find() on the model and then populate the unit_id but that would cause performance issues in the repeater ??