select field has no value when submitted

I have a select in my form, which is included in a livewire component:
Select::make('assigned_to')
->searchable()
->options(fn (): array => Team::with('members')
->where('id', Filament::getTenant()->id)
->first()
->members->mapWithKeys(function ($member) {
return [$member->id => $member->fullName];
})
->toArray())
Select::make('assigned_to')
->searchable()
->options(fn (): array => Team::with('members')
->where('id', Filament::getTenant()->id)
->first()
->members->mapWithKeys(function ($member) {
return [$member->id => $member->fullName];
})
->toArray())
The form values are all there when I call dd($this->form->getState()) when the form is submitted, but the assigned_to value is always null. Is there something else I need to declare on the select to make it work right? The field is in $this->form->getState(), but is missing from $this->data (I have ->statePath('data') on my form).
1 Reply
Jon Mason
Jon MasonOP13mo ago
if I take off searchable it works. ugh. is this a bug, or am I not setting it up right?
Want results from more Discord servers?
Add your server