Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading