true for an empty cell
rows (display order)
columns (model indices)
start row
start column
1, 0 or 1
1, 0 or 1
Optional isShownColumn: ((column) => boolean) = ...false for a hidden column
the target cell (the start if there is nothing to move to)
const data = [[1], [2], [""], [""], [5]];
const isEmpty = (r: number, c: number) => data[r][c] === "";
findDataEdge(isEmpty, 5, 1, 0, 0, 1, 0); // [1, 0] – end of the block 1, 2
findDataEdge(isEmpty, 5, 1, 1, 0, 1, 0); // [4, 0] – next filled cell
1.1.99
The target of Ctrl+arrow (⌘+arrow on macOS) in Excel-style editing – Excel's rule for jumping to the edge of the data: if the cell next to the start is empty, the next filled cell in that direction (or the last cell); if it is filled, the last filled cell of that block. Empty =
null,undefinedor""(not0, notfalse). DOM-free; hidden columns (isShownColumn→false) are skipped.