Tally
Tally
FFilament
Created by Tally on 5/27/2024 in #❓┊help
ToggleButtons problem can anyone check if the multiple option is still working?
If you create a simple ToggleButtons field like this
Forms\Components\ToggleButtons::make('test')
->multiple()
->options([
'one', 'two', 'three', 'four', 'five',
]),
Forms\Components\ToggleButtons::make('test')
->multiple()
->options([
'one', 'two', 'three', 'four', 'five',
]),
If I click "two" everything is selected? If I inspect the livewire data... the test is null instead of [] Am I missing something?
22 replies
FFilament
Created by Tally on 5/26/2023 in #❓┊help
Listening for events
Hi there, I was wondering where I'm making a mistake? I have a Form Component Select
Forms\Components\Select::make('projectstatus_id')
->relationship('status', 'naam')
->reactive()
->registerListeners([
'updateOptions' => [
function (Forms\Components\Component $component): void {
ray($component);
},
],
])
->label('Current status'),

Forms\Components\Select::make('projectstatus_id')
->relationship('status', 'naam')
->reactive()
->registerListeners([
'updateOptions' => [
function (Forms\Components\Component $component): void {
ray($component);
},
],
])
->label('Current status'),

From withing my custom Livewire component I'm emitting an event
$this->emit('updateOptions');
$this->emit('updateOptions');
This works if I check the events tab of the LiveWire devtools. So how to receive the event from the LiveWire component. The goal is to update the status field with the current status which is changed from within the LiveWire component.
6 replies