Skip to content

Commit

Permalink
Merge pull request #340 from holmesadam/cloning-options
Browse files Browse the repository at this point in the history
When cloning, merge in all the options from the original item
  • Loading branch information
atmonshi authored Dec 24, 2024
2 parents 2c8f0b3 + d9b71c3 commit f356fb6
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 @@ -373,9 +373,9 @@ public static function getSectionsSchema(): array
$originalItem = end($items);
$clonedItem = array_merge($originalItem, [
'name' => $originalItem['name'] . ' new',
'options' => [
'options' => array_merge($originalItem['options'], [
'htmlId' => $originalItem['options']['htmlId'] . Str::random(2),
],
]),
]);

$items[] = $clonedItem;
Expand Down

0 comments on commit f356fb6

Please sign in to comment.