Dropdown Options Not Displaying in Reactive Filament Form Section When Disabled

I'm working with a Filament form and facing an issue with a section that is conditionally disabled. Here's the setup: I have a section created with
Forms\Components\Section::make('Relatie')
Forms\Components\Section::make('Relatie')
and it's disabled based on a condition:
->disabled(fn (Forms\Get $get) => $get('c_type_id') == null)
->disabled(fn (Forms\Get $get) => $get('c_type_id') == null)
. This conditional disabling is functioning as expected. The section is disabled when 'c_type_id' is null and becomes enabled when a 'c_type_id' is selected. The issue arises with a Select component within this enabled section. The Select component is defined as follows:
Forms\Components\Select::make('relation_id')
->label('Kies een relatie')
->searchable()
->preload()
->required()
->relationship('relation', 'contact_name')
->reactive()
->createOptionForm([
Forms\Components\TextInput::make('contact_name')->label('Contact persoon')->required(),
Forms\Components\Hidden::make('organisation_id')->default(Filament::getTenant()->id),
Forms\Components\TextInput::make('email')->label('Email')->email(),
Forms\Components\TextInput::make('company_name')->label('Bedrijfsnaam'),
Forms\Components\TextInput::make('phone')->label('Telefoon'),
Forms\Components\TextInput::make('vat_number')->label('Belastingnummer'),
Forms\Components\TextInput::make('kvk_number')->label('KVK nummer'),
])
Forms\Components\Select::make('relation_id')
->label('Kies een relatie')
->searchable()
->preload()
->required()
->relationship('relation', 'contact_name')
->reactive()
->createOptionForm([
Forms\Components\TextInput::make('contact_name')->label('Contact persoon')->required(),
Forms\Components\Hidden::make('organisation_id')->default(Filament::getTenant()->id),
Forms\Components\TextInput::make('email')->label('Email')->email(),
Forms\Components\TextInput::make('company_name')->label('Bedrijfsnaam'),
Forms\Components\TextInput::make('phone')->label('Telefoon'),
Forms\Components\TextInput::make('vat_number')->label('Belastingnummer'),
Forms\Components\TextInput::make('kvk_number')->label('KVK nummer'),
])
When the section is enabled (i.e., 'c_type_id' is selected), I can interact with the Select component, and it allows me to create new relationships using the createOptionForm. However, the main issue is that the dropdown list itself does not show up. What could be causing the dropdown not to display? Are there any additional settings or adjustments I need to make to ensure the dropdown list is visible and functional when the section is enabled?
1 Reply
Luukd_2000
Luukd_20007mo ago
If I click on the dropdown, nothing happens
No description