From 022575e5c821edd93dc4761e5ce30419b82e1313 Mon Sep 17 00:00:00 2001 From: Georgi Gabrovski Date: Sat, 5 Oct 2024 09:27:47 +0300 Subject: [PATCH] Fix tabs conflicts in CollectionField when using "useEntryCrudForm" with tabs. --- src/Factory/FormLayoutFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Factory/FormLayoutFactory.php b/src/Factory/FormLayoutFactory.php index 917e5ee5ca..be069d41f7 100644 --- a/src/Factory/FormLayoutFactory.php +++ b/src/Factory/FormLayoutFactory.php @@ -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);