From ce1658522b6ffa5ae5545683a04d4306b6561b76 Mon Sep 17 00:00:00 2001 From: gowtham-balaganesh Date: Fri, 20 Sep 2024 16:46:50 +0530 Subject: [PATCH] feat: hide add section button inside sections --- .../form-builder/components/fb-field-drag-drop-item.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/crayons-extended/custom-objects/src/components/form-builder/components/fb-field-drag-drop-item.tsx b/packages/crayons-extended/custom-objects/src/components/form-builder/components/fb-field-drag-drop-item.tsx index 97aac7093..b3f0c0b5c 100644 --- a/packages/crayons-extended/custom-objects/src/components/form-builder/components/fb-field-drag-drop-item.tsx +++ b/packages/crayons-extended/custom-objects/src/components/form-builder/components/fb-field-drag-drop-item.tsx @@ -161,10 +161,13 @@ export class FormBuilderFieldDragDropItem { hasCustomProperty(this.dataProvider, objProductConfig.defaultTagKey) && !this.dataProvider[objProductConfig.defaultTagKey]; + const isCustomDropdownField = + !isDefaultNonCustomField && isDropdownField(this.dataProvider); + const showDynamicFieldSections = this.dynamicSectionsBetaEnabled && - !isDefaultNonCustomField && - isDropdownField(this.dataProvider); + isCustomDropdownField && + !this.sectionName; let choicesWithNoSectionCreated = [], noOfSections = 0,