`->live()` Not working as `->reactive()`

I don't know if I am doing something wrong here, but as of what I can see in the docs is that reactive is now replaced by live? If I replace it, the afterStateUpdated is not triggered. Is there something else that needs to be done to the form or? My code looks something like this
Select::make('data.qa1')
->label('qa1')
->options([
'a1' => 'a1',
'a2' => 'a2',
'a3' => 'a3',
])
->live()
->afterStateUpdated(function (Get $get, Component $component, ?string $state) {
echo $state;
}),
Select::make('data.qa1')
->label('qa1')
->options([
'a1' => 'a1',
'a2' => 'a2',
'a3' => 'a3',
])
->live()
->afterStateUpdated(function (Get $get, Component $component, ?string $state) {
echo $state;
}),
2 Replies
Dennis Koch
Dennis Koch16mo ago
I think there was an open issue about this.
stijntrinos
stijntrinosOP16mo ago
Just found the fix. At the top of the component class, I needed to declare public $data. In V2 thsi wasn't the case.
Want results from more Discord servers?
Add your server