Skip to content

Commit

Permalink
Merge pull request #338 from holmesadam/clone-fix
Browse files Browse the repository at this point in the history
Fix issue with cloning form fields
  • Loading branch information
atmonshi authored Dec 24, 2024
2 parents f356fb6 + 0a955c0 commit 8dbbad9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/Schemata.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ public static function getSectionsSchema(): array
->cloneable()
->minItems(1)

->cloneAction(fn (Action $action) => $action->action(function (Component $component) {
->cloneAction(fn(Action $action) => $action->action(function (Component $component, $arguments) {
$items = $component->getState();
$originalItem = end($items);
$originalItem = $items[$arguments['item']];
$clonedItem = array_merge($originalItem, [
'name' => $originalItem['name'] . ' new',
'options' => array_merge($originalItem['options'], [
Expand Down

0 comments on commit 8dbbad9

Please sign in to comment.