When is afterStateUpdated triggered for a repeater?
I am trying to perform some calculations when a new row is added or deleted. I see that the
afterStateUpdated
is triggered when the row is added and details are added to the row, but can't seem to get the afterStateUpdated
to work when a row is deleted.. Can you please advice if this is a bug or if I am missing something? This is for a standalone Form builder.
Here is the code I have
5 Replies
How is
$this->subTotal
used in the rest of the component?it isn't used anywhere except for the blade file
{{$subTotal}}
I see... I'm not sure if this is the best option but maybe you could move this outside of the field, in a regular method on your component?
Then in your Blade view:
But to your original question, it could be a bug with
afterStateUpdated()
... it sounds like this should fire even when items are deleted.ok, let me try that
Th is could still be due to outstanding bugs with livewire’s entangle. It still needs some work but not much Filament can do about that.