Skip to content

Commit

Permalink
Fix tabs conflicts in CollectionField when using "useEntryCrudForm" w…
Browse files Browse the repository at this point in the history
…ith tabs.
  • Loading branch information
ggabrovski committed Oct 5, 2024
1 parent 67994e3 commit 022575e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factory/FormLayoutFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private function linearizeLayoutConfiguration(FieldCollection $fields): void

if ($fieldDto->isFormTab()) {
$isTabActive = 0 === \count($tabs);
$tabId = sprintf('tab-%s', $fieldDto->getLabel() ? $slugger->slug(strip_tags($fieldDto->getLabel()))->lower()->toString() : ++$tabsWithoutLabelCounter);
$tabId = sprintf('tab-%s-%s', $fieldDto->getLabel() ? $slugger->slug(strip_tags($fieldDto->getLabel()))->lower()->toString() : ++$tabsWithoutLabelCounter, new Ulid());
$fieldDto->setCustomOption(FormField::OPTION_TAB_ID, $tabId);
$fieldDto->setCustomOption(FormField::OPTION_TAB_IS_ACTIVE, $isTabActive);

Expand Down

0 comments on commit 022575e

Please sign in to comment.