Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

anilaeus's avatar

Filament afterStateUpdated()

Good Day,

I am having hard time to make dependent states with FilamentPHP.

I have multiple Select Components in my form. And whenever a select occur i want other selects comes after it will be null again.

For example:

Section::make('Reservation Information')->schema([ TextInput::make('size')->label('Person Count')->numeric()->required()->minLength(1)- >maxLength(120), Select::make('table_location')->options(['Saloon', 'Terrace'])->label('Table Location') ])->columns(2),

                when i use afterStateUpdated(fn(Get $get, Set $set)=>$set('table_location', null))    it just make its value under the hood null however my select box show as is selected as before.

Whats the solution here? anyone suffer same situation and found a solution?

0 likes
0 replies

Please or to participate in this conversation.