bjornbjorn
bjornbjorn
FFilament
Created by bjornbjorn on 12/14/2023 in #❓┊help
Bug with select->multiple(), other ->live() components and $get()?
Hi, I have this component added to the form:
protected static function getUsersFormComponent() : Components\Component
{
return Components\Select::make('users')
->label(__('Employees'))
->searchable()
->relationship('users', 'name')
->preload()
->exists(table: User::class, column: 'id')
->multiple();
}
protected static function getUsersFormComponent() : Components\Component
{
return Components\Select::make('users')
->label(__('Employees'))
->searchable()
->relationship('users', 'name')
->preload()
->exists(table: User::class, column: 'id')
->multiple();
}
And then I have various components with ->live() on them which uses $get() and $set() on the form. This all works fine with a regular Select, but when adding ->multiple() to the select the form breaks because $get('some_value') will return null. If I remove ->multiple() from the select again I get the values. This happens when you interact with the select, removing or adding users for instance. I'm wondering if anyone else has experienced this and if it might be a bug.
7 replies