Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
stateKey: keyof IMutableTableState,
) => (event: React.FormEvent) => void;
const COLUMN_COUNTS = [0, 1, 5, 20, 100, 1000];
const ROW_COUNTS = [0, 1, 5, 20, 100, 1000, 100000];
const FROZEN_COLUMN_COUNTS = [0, 1, 2, 5, 20, 100, 1000];
const FROZEN_ROW_COUNTS = [0, 1, 2, 5, 20, 100, 1000];
const REGION_CARDINALITIES: RegionCardinality[] = [
RegionCardinality.CELLS,
RegionCardinality.FULL_ROWS,
RegionCardinality.FULL_COLUMNS,
RegionCardinality.FULL_TABLE,
];
const RENDER_MODES: RenderMode[] = [RenderMode.BATCH_ON_UPDATE, RenderMode.BATCH, RenderMode.NONE];
const SELECTION_MODES: SelectedRegionTransformPreset[] = [
SelectedRegionTransformPreset.CELL,
SelectedRegionTransformPreset.ROW,
SelectedRegionTransformPreset.COLUMN,
];
const CELL_CONTENTS: CellContent[] = [
CellContent.EMPTY,
CellContent.CELL_NAMES,
CellContent.LONG_TEXT,
CellContent.LARGE_JSON,
];
const TRUNCATED_POPOVER_MODES: TruncatedPopoverMode[] = [
TruncatedPopoverMode.ALWAYS,
private toRenderModeLabel(renderMode: RenderMode) {
switch (renderMode) {
case RenderMode.BATCH:
return "Batch";
case RenderMode.BATCH_ON_UPDATE:
return "Batch on update";
default:
return "None";
}
}
enableColumnReordering: true,
enableColumnResizing: true,
enableColumnSelection: true,
enableContextMenu: false,
enableFullTableSelection: true,
enableLayoutBoundary: false,
enableMultiSelection: true,
enableRowReordering: false,
enableRowResizing: false,
enableRowSelection: true,
enableSlowLayout: false,
numCols: COLUMN_COUNTS[COLUMN_COUNT_DEFAULT_INDEX],
numFrozenCols: FROZEN_COLUMN_COUNTS[FROZEN_COLUMN_COUNT_DEFAULT_INDEX],
numFrozenRows: FROZEN_ROW_COUNTS[FROZEN_ROW_COUNT_DEFAULT_INDEX],
numRows: ROW_COUNTS[ROW_COUNT_DEFAULT_INDEX],
renderMode: RenderMode.BATCH_ON_UPDATE,
scrollToColumnIndex: 0,
scrollToRegionType: RegionCardinality.CELLS,
scrollToRowIndex: 0,
selectedFocusStyle: FocusStyle.TAB,
selectedRegionTransformPreset: SelectedRegionTransformPreset.CELL,
selectedRegions: [],
showCallbackLogs: true,
showCellsLoading: false,
showColumnHeadersLoading: false,
showColumnMenus: false,
showCustomRegions: false,
showFocusCell: false,
showGhostCells: true,
showInline: false,
showRowHeaders: true,
showRowHeadersLoading: false,