fix(sidebar): keep table search results on Enter
This commit is contained in:
1 parent
acc2137cde
commit
0908a944e8
4 files changed
+77
-11
No files matched your search
@@ -98,6 +98,15 @@ export function mutateFlatTreeExpansion(nodes: readonly FlatTreeNode[], parentIn
|
||||
return replaceFlatTreeChildren(nodes, parentIndex, parent);
|
||||
}
|
||||
|
||||
/** Whether the visible row identities changed enough to refresh recycled views. */
|
||||
export function flatTreeRowsChanged(nodes: readonly FlatTreeNode[], previousNodes: readonly FlatTreeNode[] | undefined): boolean {
|
||||
if (!previousNodes || nodes.length !== previousNodes.length) return true;
|
||||
return nodes.some((item, index) => {
|
||||
const previous = previousNodes[index];
|
||||
return !previous || item.renderKey !== previous.renderKey || item.poolType !== previous.poolType || item.depth !== previous.depth;
|
||||
});
|
||||
}
|
||||
|
||||
export function shouldVirtualizeFlatTree(count: number): boolean {
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user