fix: clear instances when page hidden

This commit is contained in:
jialin
2025-01-19 20:51:06 +08:00
parent 4643dbce17
commit c49bfb97dd
12 changed files with 83 additions and 82 deletions
@@ -197,6 +197,7 @@ const TableRow: React.FC<
const handleVisibilityChange = async () => {
if (document.visibilityState === 'hidden') {
cacheDataListRef.current = [];
setChildrenData([]);
}
};
@@ -218,10 +219,6 @@ const TableRow: React.FC<
};
}, [firstLoad, expanded, tableContext.allChildren]);
useEffect(() => {
console.log('allSubChildren===', tableContext.allSubChildren);
}, [tableContext.allSubChildren]);
const renderRowPrefix = () => {
if (expandable && rowSelection) {
return (