@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
10 lines (9 loc) • 479 B
JavaScript
import { rowIndexForSection } from "@1771technologies/lytenyte-shared";
export const makeRowByIndex = (grid) => {
return (index, section = "flat") => {
const rowIndex = rowIndexForSection(index, section, grid.state.rowDataStore.rowTopCount.get(), grid.state.rowDataStore.rowBottomCount.get(), grid.state.rowDataStore.rowCount.get());
if (rowIndex == null)
return null;
return grid.state.rowDataSource.get().rowByIndex(rowIndex);
};
};