View as Markdown

API reference: @salmonui/gantt

GanttGridPropstype

import type { GanttGridProps } from '@salmonui/gantt';
type GanttGridProps<Row> = Pick<DataGridProps<Row>, 'sorting' | 'onBeforeSortChange' | 'onSortChange' | 'filtering' | 'onBeforeFilterChange' | 'onFilterChange' | 'search' | 'onBeforeSearchChange' | 'onSearchChange' | 'selection' | 'onBeforeSelectionChange' | 'onSelectionChange' | 'columnMenu' | 'renderContextMenu' | 'reorderable' | 'onBeforeColumnReorder' | 'onColumnReorder' | 'resizable' | 'resizeMode' | 'onColumnResizeStart' | 'onColumnResize' | 'onColumnResizeEnd' | 'columnChooser' | 'onBeforeColumnVisibilityChange' | 'onColumnVisibilityChange' | 'gridLines' | 'highlightOnHover' | 'striped' | 'textWrap' | 'overflow' | 'getRowProps' | 'getCellProps' | 'rowClassName' | 'renderEmpty' | 'loadingIndicator' | 'onViewChange' | 'onRowDoubleClick' | 'onRowClick' | 'onCellClick' | 'rowDrag' | 'onBeforeRowDrop' | 'onRowDrop' | 'onRowDragStart' | 'onRowDrag' | 'onBeforeTreeToggle' | 'onTreeToggle' | 'onBeforeEditStart' | 'onBeforeCellValueChange' | 'onBeforeSave' | 'onSave' | 'keyBindings' | 'onKeyDown' | 'virtualization' | 'initialRows' | 'currency' | 'icons' | 'features'>;

Grid-pane props passed to the DataGrid unchanged (GGRID rows keep the Data Grid names).

GanttGridProps members (57, 57 inherited)
NameSignatureDescription
columnMenuoptionalinheritedcolumnMenu?: boolean | readonly (DataGridMenuItem | DataGridColumnMenuItemId)[];

Column menu; an array lists the items in order (built-in ids or custom items). column.menu: false opts a column out.

columnChooseroptionalinheritedcolumnChooser?: boolean | DataGridColumnChooser<Row>;
renderContextMenuoptionalinheritedrenderContextMenu?: ((ctx: DataGridContextMenuContext) => ReactNode);
onColumnResizeStartoptionalinheritedonColumnResizeStart?: ((event: DataGridColumnResizeEvent) => void);
onColumnResizeoptionalinheritedonColumnResize?: ((event: DataGridColumnResizeEvent) => void);
onColumnResizeEndoptionalinheritedonColumnResizeEnd?: ((event: DataGridColumnResizeEvent) => void);
onBeforeEditStartoptionalinheritedonBeforeEditStart?: ((event: DataGridEditStartEvent<Row>) => void);
onBeforeCellValueChangeoptionalinheritedonBeforeCellValueChange?: ((event: DataGridCellValueChangeEvent) => void);
onBeforeSaveoptionalinheritedonBeforeSave?: ((event: DataGridSaveEvent<Row>) => void);
onSaveoptionalinheritedonSave?: ((event: DataGridSaveEvent<Row>) => void);
sortingoptionalinheritedsorting?: boolean | DataGridSorting;

true or options: header sorting.

filteringoptionalinheritedfiltering?: boolean | DataGridFiltering;

true or options: filtering and its UI.

searchoptionalinheritedsearch?: boolean | DataGridSearch;

true or options: searching.

onBeforeSortChangeoptionalinheritedonBeforeSortChange?: ((event: DataGridSortChangeEvent) => void);
onSortChangeoptionalinheritedonSortChange?: ((event: DataGridSortChangeEvent) => void);
onBeforeFilterChangeoptionalinheritedonBeforeFilterChange?: ((event: DataGridFilterChangeEvent) => void);
onFilterChangeoptionalinheritedonFilterChange?: ((event: DataGridFilterChangeEvent) => void);
onBeforeSearchChangeoptionalinheritedonBeforeSearchChange?: ((event: DataGridSearchChangeEvent) => void);
onSearchChangeoptionalinheritedonSearchChange?: ((event: DataGridSearchChangeEvent) => void);
rowDragoptionalinheritedrowDrag?: boolean | DataGridRowDrag;

Row drag and drop with a drag handle column; true reorders within the grid.

onRowDragStartoptionalinheritedonRowDragStart?: ((event: DataGridRowDragEvent<Row>) => void);

Cancel with event.preventDefault().

onRowDragoptionalinheritedonRowDrag?: ((event: DataGridRowDragEvent<Row>) => void);

Once per animation frame while dragging.

onBeforeRowDropoptionalinheritedonBeforeRowDrop?: ((event: DataGridRowDragEvent<Row>) => void);

Cancel with event.preventDefault().

onRowDropoptionalinheritedonRowDrop?: ((event: DataGridRowDragEvent<Row>) => void);
loadingIndicatoroptionalinheritedloadingIndicator?: "skeleton" | "spinner";

Built-in loading indicator. Default spinner.

onRowClickoptionalinheritedonRowClick?: ((event: DataGridRowClickEvent<Row>) => void);

A data row was clicked. preventDefault() skips the built-in selection and focus.

onRowDoubleClickoptionalinheritedonRowDoubleClick?: ((event: DataGridRowClickEvent<Row>) => void);

A data row was double-clicked. preventDefault() skips the built-in edit start.

onCellClickoptionalinheritedonCellClick?: ((event: DataGridCellClickEvent<Row>) => void);

A cell of a data row was clicked; fires before onRowClick.

onBeforeTreeToggleoptionalinheritedonBeforeTreeToggle?: ((event: DataGridTreeToggleEvent<Row>) => void);
onTreeToggleoptionalinheritedonTreeToggle?: ((event: DataGridTreeToggleEvent<Row>) => void);
featuresoptionalinheritedfeatures?: readonly DataGridFeature[];

Salmon. Render features to use synchronously, from @salmonui/data-grid/features. Optional: a grid loads the features its props need on demand; features passed here skip that load (no placeholder on a client-only render). Read at creation.

currencyoptionalinheritedcurrency?: string;
virtualizationoptionalinheritedvirtualization?: boolean | DataGridVirtualization;

Row and column virtualization; true (default) for the defaults, false renders every row and column.

initialRowsoptionalinheritedinitialRows?: number;

Rows in the deterministic server/initial range. Default 20.

textWrapoptionalinheritedtextWrap?: DataGridTextWrap;
gridLinesoptionalinheritedgridLines?: DataGridLines;
overflowoptionalinheritedoverflow?: DataGridOverflow;

Default text overflow of every column. Default ellipsis.

highlightOnHoveroptionalinheritedhighlightOnHover?: boolean;

Row hover highlight. Default true.

stripedoptionalinheritedstriped?: boolean;

Alternate row shading. Default true.

resizableoptionalinheritedresizable?: boolean;

Pointer and keyboard column resize. Default false; column resizable refines it.

resizeModeoptionalinheritedresizeMode?: "auto" | "normal";

Column fit. 'normal' (default): widths are kept, leaving empty space or scrolling. 'auto': when the columns are narrower than the grid they stretch proportionally to fill it, and a pointer resize re-fits the other columns.

reorderableoptionalinheritedreorderable?: boolean;

Pointer and keyboard column reorder. Default false; column reorderable refines it.

onBeforeColumnVisibilityChangeoptionalinheritedonBeforeColumnVisibilityChange?: ((event: DataGridColumnVisibilityChangeEvent) => void);
onColumnVisibilityChangeoptionalinheritedonColumnVisibilityChange?: ((event: DataGridColumnVisibilityChangeEvent) => void);
onBeforeColumnReorderoptionalinheritedonBeforeColumnReorder?: ((event: DataGridColumnReorderEvent) => void);
onColumnReorderoptionalinheritedonColumnReorder?: ((event: DataGridColumnReorderEvent) => void);
renderEmptyoptionalinheritedrenderEmpty?: ((ctx: DataGridEmptyContext) => ReactNode);
onViewChangeoptionalinheritedonViewChange?: ((event: DataGridViewChangeEvent) => void);

Once per committed change of the displayed rows; never on scroll, focus, selection, or expansion.

getRowPropsoptionalinheritedgetRowProps?: ((row: Row, rowIndex: number, ctx: { readonly tree?: DataGridTreeContext; }) => DataGridElementProps | undefined);

Called for rendered rows only; ctx.tree in tree mode.

rowClassNameoptionalinheritedrowClassName?: ((row: Row, rowIndex: number) => string | undefined);
getCellPropsoptionalinheritedgetCellProps?: ((ctx: DataGridCellContext<Row>) => DataGridElementProps | undefined);

Called for rendered cells only.

iconsoptionalinheritedicons?: Partial<Record<DataGridIconName, ReactNode>>;

Icon overrides by name: a node replaces the built-in SVG icon, null hides it. Merges over an enclosing DataGridIconsProvider. A component prop, not a theme input.

selectionoptionalinheritedselection?: boolean | DataGridSelection;

Selection. On by default: single row selection. false turns it off.

onBeforeSelectionChangeoptionalinheritedonBeforeSelectionChange?: ((event: DataGridSelectionChangeEvent<Row>) => void);

Cancel with event.preventDefault().

onSelectionChangeoptionalinheritedonSelectionChange?: ((event: DataGridSelectionChangeEvent<Row>) => void);
keyBindingsoptionalinheritedkeyBindings?: Readonly<Record<string, readonly string[]>>;

Replaces the combos of keyboard commands ({ 'selection.selectAll': ['Mod+Shift+L'] }). Reactive: a changed value (compared by value) rebuilds the keymap.

onKeyDownoptionalinheritedonKeyDown?: ((ctx: DataGridKeyDownContext) => void);

Called for every key pressed in the grid before the built-in binding runs.