FilamentF
Filament3y ago
qcol

$set and Placeholder content

I have a Select element, after selecting which I wanted to change the content of the Placeholder element. Select is ->live() however if I try in ->afterStateUpdated to give $set("my_placeholder",$new_data) - the placeholder content does not change. On TextInput fields $set works fine. How to do this?
Solution
Placeholder::make('placeholder')
    ->content(fn (Get $get): string => $get('select') ?? '')
Was this page helpful?