© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Abi

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
afterStateUpdated
is triggered when the row is added and details are added to the row, but can't seem to get the
afterStateUpdated
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
 Repeater::make('add_new_kids')
      ->schema([
         // Schema Fields go here
      ])->columnSpanFull()->columns(4)
      ->live()
      ->afterStateUpdated(function (Get $get) {
          $this->quantity = count($get('existing_kids') ?? []) + count($get('add_new_kids') ?? []);
          $this->subTotal = $this->quantity * $this->price;
      }),
 Repeater::make('add_new_kids')
      ->schema([
         // Schema Fields go here
      ])->columnSpanFull()->columns(4)
      ->live()
      ->afterStateUpdated(function (Get $get) {
          $this->quantity = count($get('existing_kids') ?? []) + count($get('add_new_kids') ?? []);
          $this->subTotal = $this->quantity * $this->price;
      }),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Repeater afterStateUpdated
FilamentFFilament / ❓┊help
15mo ago
Repeater afterStateUpdated not returning the old state
FilamentFFilament / ❓┊help
5mo ago
Issue with afterStateUpdated Updating Too Quickly in Repeater
FilamentFFilament / ❓┊help
12mo ago