fix: delay in updating model list

This commit is contained in:
jialin
2024-12-12 16:28:14 +08:00
parent dde746a5fe
commit 85949c5927
3 changed files with 11 additions and 20 deletions
+5 -4
View File
@@ -27,10 +27,11 @@ export function useUpdateChunkedList(options: {
}, [options.dataList]);
const debounceUpdateChunckedList = () => {
clearTimeout(timerRef.current);
timerRef.current = setTimeout(() => {
options.setDataList?.([...cacheDataListRef.current]);
}, 80);
// clearTimeout(timerRef.current);
// timerRef.current = setTimeout(() => {
// options.setDataList?.([...cacheDataListRef.current]);
// }, 80);
options.setDataList?.([...cacheDataListRef.current]);
};
const updateChunkedList = (data: ChunkedCollection) => {
console.log('updateChunkedList=====', {