UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

18 lines (17 loc) 510 B
export function maybeApplyResize(pathNode, size, asOf) { if (size == null) return false; if (size === pathNode.size) return false; if (pathNode.asOf > asOf) return false; pathNode.size = size; // Remove those nodes that are no long within the allowed size for (const [number, node] of pathNode.byIndex) { if (number >= size) { pathNode.byIndex.delete(number); pathNode.byPath.delete(node.path); } } return true; }