Skip to content

Commit 3315c69

Browse files
Merge pull request #1004 from freshworks-oss/FC-136886
fix: fixes the section modal render issue on id
2 parents 6edc4b5 + 0a4bf44 commit 3315c69

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

  • packages/crayons-extended/custom-objects/src/components/form-builder

packages/crayons-extended/custom-objects/src/components/form-builder/form-builder.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,24 +1185,24 @@ export class FormBuilder {
11851185
'DELETE'
11861186
);
11871187

1188-
let modalConfirmDelete: any = null;
1189-
1190-
const confirmDeleteSectionHandler = (objDetail) => {
1191-
this.fwDeleteField.emit({ sectionDeletion: true, ...objDetail });
1192-
modalConfirmDelete?.close();
1193-
};
1194-
1195-
const deleteSectionClickHandler = (event: CustomEvent) => {
1196-
event.stopImmediatePropagation();
1197-
event.stopPropagation();
1198-
if (boolDeleteAllowed) {
1199-
modalConfirmDelete?.open();
1200-
}
1201-
};
1202-
12031188
return (
12041189
<div>
12051190
{dataItem.choices?.map((choice) => {
1191+
let modalConfirmDelete: any = null;
1192+
1193+
const confirmDeleteSectionHandler = (objDetail) => {
1194+
this.fwDeleteField.emit({ sectionDeletion: true, ...objDetail });
1195+
modalConfirmDelete?.close();
1196+
};
1197+
1198+
const deleteSectionClickHandler = (event: CustomEvent) => {
1199+
event.stopImmediatePropagation();
1200+
event.stopPropagation();
1201+
if (boolDeleteAllowed) {
1202+
modalConfirmDelete?.open();
1203+
}
1204+
};
1205+
12061206
const acceptFromSections = dataItem.choices
12071207
.filter((c) => c.choice_options?.section_name) // Ensure section_name is defined
12081208
.map((c) => `sectionIdentifier-${c.choice_options.section_name}`)

0 commit comments

Comments
 (0)