F
Filament4mo ago
ico

Filament v2 Repeater can't detect when item deleted

How do i catch when i have deleted item from the Repeater in Filament v2 form builder ? i tried with afterStateHydrated and afterStateUpdated but it doesn't work, i don't get the dd()
Repeater::make('......')
->schema([.........])

// first try
->afterStateHydrated(function (Repeater $component, $state, $get) {
dd($component, $state);
})
->afterStateUpdated(function (Repeater $component, $state, $get) {
dd($component, $state);
})

// second try
->afterStateHydrated(function () {
dd(222222);
})
->afterStateUpdated(function () {
dd(111111);
})
Repeater::make('......')
->schema([.........])

// first try
->afterStateHydrated(function (Repeater $component, $state, $get) {
dd($component, $state);
})
->afterStateUpdated(function (Repeater $component, $state, $get) {
dd($component, $state);
})

// second try
->afterStateHydrated(function () {
dd(222222);
})
->afterStateUpdated(function () {
dd(111111);
})
I saw that in the Repeater class it registers listeners like repeater::deleteItem. I tried to catch that event but it didn't work also
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server