Revert "fix: close select dropdpwn when parent compoment is changed (#18950)" (#18975)

This reverts commit 81635db28a26e8a2a4b61a85f888e3433c72cd48.
This commit is contained in:
Karan Hotchandani 2024-12-09 19:28:34 +05:30 committed by GitHub
parent 7d7bc5b48b
commit 663e7f4c50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 16 deletions

View File

@ -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('');
}, []);
@ -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();

View File

@ -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);
@ -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}