How to get other repeaters items
I have a repeater item containing a Toggle, i want only one toggle in the repeater item list to be active at a time, so if the user checks a toggle i want to use *afterStateUpdated *and set all the other toggle in the repeater to false, i tried to use the $get Closure but i don't know what to put in the selector since the $get of a repeater is relative to the item itself, i'm new to Filament, any help would be appreciated.
3 Replies
That is possible with some lifecycle hooks, but it creates a bigger problem of determining which toggle is the source of truth when manipulating the data before saving it. Might be possible to loop through the data and throw a validation error before saving though.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
You could get the whole state via
fn ($livewire) => $livewire->getState()