Skip to content

Commit

Permalink
Merge pull request #33 from clefa-media/main
Browse files Browse the repository at this point in the history
handle afterStateUpdated as array
  • Loading branch information
joshembling authored Sep 17, 2024
2 parents a4678ac + 02ffb3e commit 9baf85a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/BaseFileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ protected function callAfterStateUpdatedHook(Closure $hook): void

public function callAfterStateUpdated(): static
{
if ($callback = $this->afterStateUpdated) {
$state = $this->getState();
$state = $this->getState();

foreach ($this->afterStateUpdated as $callback) {
$this->evaluate($callback, [
'state' => $this->isMultiple() ? $state : Arr::first($state ?? []),
]);
Expand Down

0 comments on commit 9baf85a

Please sign in to comment.