Skip to content

Commit

Permalink
Revert "fix: close select dropdpwn when parent compoment is changed (#…
Browse files Browse the repository at this point in the history
…18950)"

This reverts commit 81635db.
  • Loading branch information
karanh37 authored Dec 9, 2024
1 parent 7d7bc5b commit faa5db6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,6 @@ const AsyncSelectList: FC<AsyncSelectListProps & SelectProps> = ({
onChange?.(selectedValues);
};

const handleDropdownChange = (open: boolean) => {
if (!open) {
// Close the form when the dropdown closes
onCancel && onCancel();
}
};

useEffect(() => {
loadOptions('');
}, []);
Expand Down Expand Up @@ -321,7 +314,6 @@ const AsyncSelectList: FC<AsyncSelectListProps & SelectProps> = ({
style={{ width: '100%' }}
tagRender={customTagRender}
onChange={handleChange}
onDropdownVisibleChange={handleDropdownChange}
onInputKeyDown={(event) => {
if (event.key === 'Backspace') {
return event.stopPropagation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
}
}, 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);
Expand Down Expand Up @@ -334,7 +327,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
treeData={treeData}
treeExpandedKeys={isEmpty(searchOptions) ? undefined : expandedRowKeys}
onChange={handleChange}
onDropdownVisibleChange={handleDropdownChange}
onSearch={onSearch}
onTreeExpand={setExpandedRowKeys}
{...props}
Expand Down

0 comments on commit faa5db6

Please sign in to comment.