Select [all options] of dropdown inside repeater
I have (not multiple) select inside a repeater
i use the repeater when i want to select more than one option
i need to be able to select all options either by add a new option to dropdown or any other way such as radio
i use the repeater when i want to select more than one option
i need to be able to select all options either by add a new option to dropdown or any other way such as radio
Forms\Components\Repeater::make('featuresTest')
->itemLabel(fn (array $state): ?string => Feature::query()->where('id',$state['feature_id'])->first()['name']?? null)
->relationship()
->schema([
Forms\Components\Select::make('feature_id')
->label('Feature')
->options(function(callable $get){
$test_type = $get('../../type');
if(!$test_type){
return ['Please, Enter the type first'];
}
return Feature::where('type',$test_type)->pluck('name','id');
})
->required()
->reactive()
->columnSpan([
'md' => 7,
]) Forms\Components\Repeater::make('featuresTest')
->itemLabel(fn (array $state): ?string => Feature::query()->where('id',$state['feature_id'])->first()['name']?? null)
->relationship()
->schema([
Forms\Components\Select::make('feature_id')
->label('Feature')
->options(function(callable $get){
$test_type = $get('../../type');
if(!$test_type){
return ['Please, Enter the type first'];
}
return Feature::where('type',$test_type)->pluck('name','id');
})
->required()
->reactive()
->columnSpan([
'md' => 7,
])