fix: watch api block

This commit is contained in:
jialin
2024-07-15 15:16:29 +08:00
parent 21e151ac28
commit cb4c984e96
7 changed files with 110 additions and 33 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ export function useUpdateChunkedList(options: {
const cacheDataListRef = useRef<any[]>(options.dataList || []);
const updateChunkedList = (
data: ChunkedCollection,
dataList: { id: string | number }[]
dataList?: { id: string | number }[]
) => {
console.log('updateChunkedList=====', {
ids: data?.ids,
@@ -54,7 +54,7 @@ export function useUpdateChunkedList(options: {
const updateItem = _.cloneDeep(item);
newDataList.push(updateItem);
}
console.log('create=========', updateIndex, dataList, collections);
console.log('create=========', updateIndex, collections);
});
cacheDataListRef.current = [...newDataList, ...cacheDataListRef.current];
options.setDataList?.([...cacheDataListRef.current]);