How to set default in ToogleButtons?
I tried to use default('option2'), but without success.
6 Replies
May or may not be relevant but ->default() only works in the create context. For edit it should already be set.
I tried using ->default() when creating, but the page where I see this button starts without any enabled.
I apologize if I'm talking nonsense. I'm really new to laravel and filament.
hmm. i would expect that to work.
This is used in the Order Status of the demo filament. However, I couldn't find the demo code on github where it defines who is enabled in the status.
Did you add
$this->form->fill()
in the mount method?Omg! I didn't really pay attention to that. Thank you very much, Leandro.
Also needed to be included:
Solved!