pref: useScrollPagination support debounce and throttle. (#4355)

* pref: useScrollPagination support debounce and throttle.

* fix: useScrollPagination loading

* fix: isloading

* fix: org search path hide
This commit is contained in:
Finley Ge
2025-03-27 15:58:13 +08:00
committed by GitHub
parent 8b29aae238
commit e9f75c7e66
9 changed files with 68 additions and 87 deletions

View File

@@ -79,7 +79,10 @@ function MemberModal({
withOrgs: true,
status: 'active',
searchKey
}
},
throttleWait: 500,
debounceWait: 200,
refreshDeps: [searchKey]
});
const {
@@ -100,13 +103,6 @@ function MemberModal({
}
);
const search = _.debounce(() => {
refreshList();
refreshGroups();
}, 200);
useEffect(search, [searchKey]);
const [selectedOrgList, setSelectedOrgIdList] = useState<OrgListItemType[]>([]);
const [selectedMemberList, setSelectedMemberList] = useState<