refactor: request data when the drop-down list is opened (#2127)

This commit is contained in:
katherinehhh 2023-06-27 13:44:41 +08:00 committed by GitHub
parent 4d3d00a5d2
commit 360f6ae810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,7 +236,9 @@ const InternalRemoteSelect = connect(
const onDropdownVisibleChange = (visible) => { const onDropdownVisibleChange = (visible) => {
setOpen(visible); setOpen(visible);
searchData.current = null; searchData.current = null;
run(); if (visible) {
run();
}
firstRun.current = true; firstRun.current = true;
}; };
return ( return (