From 663e7f4c503237d2fb91c708afb878eba01c068a Mon Sep 17 00:00:00 2001 From: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:28:34 +0530 Subject: [PATCH] Revert "fix: close select dropdpwn when parent compoment is changed (#18950)" (#18975) This reverts commit 81635db28a26e8a2a4b61a85f888e3433c72cd48. --- .../components/common/AsyncSelectList/AsyncSelectList.tsx | 8 -------- .../common/AsyncSelectList/TreeAsyncSelectList.tsx | 8 -------- 2 files changed, 16 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/AsyncSelectList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/AsyncSelectList.tsx index 9a1db2f210a..c10ba590800 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/AsyncSelectList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/AsyncSelectList.tsx @@ -286,13 +286,6 @@ const AsyncSelectList: FC = ({ onChange?.(selectedValues); }; - const handleDropdownChange = (open: boolean) => { - if (!open) { - // Close the form when the dropdown closes - onCancel && onCancel(); - } - }; - useEffect(() => { loadOptions(''); }, []); @@ -321,7 +314,6 @@ const AsyncSelectList: FC = ({ style={{ width: '100%' }} tagRender={customTagRender} onChange={handleChange} - onDropdownVisibleChange={handleDropdownChange} onInputKeyDown={(event) => { if (event.key === 'Backspace') { return event.stopPropagation(); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/TreeAsyncSelectList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/TreeAsyncSelectList.tsx index 9ed6a8e2f82..31f8e2ebfe0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/TreeAsyncSelectList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/TreeAsyncSelectList.tsx @@ -267,13 +267,6 @@ const TreeAsyncSelectList: FC> = ({ } }, 300); - const handleDropdownChange = (open: boolean) => { - if (!open) { - // Close the form when the dropdown closes - onCancel && onCancel(); - } - }; - useEffect(() => { if (glossaries.length) { expandableKeys.current = glossaries.map((glossary) => glossary.id); @@ -334,7 +327,6 @@ const TreeAsyncSelectList: FC> = ({ treeData={treeData} treeExpandedKeys={isEmpty(searchOptions) ? undefined : expandedRowKeys} onChange={handleChange} - onDropdownVisibleChange={handleDropdownChange} onSearch={onSearch} onTreeExpand={setExpandedRowKeys} {...props}