ToggleButtons default not working
When I try to set a default to ToggleButtons form with multiple options, it does not select it.
4 Replies
Did you add $this->form->fill() in the mount method?
It works but I noticed that this piece of code messed up with setting the default state:
afterStateHydrated is called on the component during its first lifecycle and $state is null so it sets $component->state([]) at the end of the function to an empty array overrding defaut state defined in the components builder
use default data in array because you use multiple
Okay works perfectly in a tradictional Form. Im in a filtersForm. Might be an issue. I will investigate more.
This is definitely an issue. When using ToggleButtons within a filtersForm, setting defaults does not work.