Infinite Table Props
In the API Reference below we'll use DATA_TYPE
to refer to the TypeScript type that represents the data the component is bound to.
activeCellIndex
Specifies the active cell for keyboard navigation. This is a controlled prop. See the Keyboard Navigation page for more details.
activeRowIndex
Specifies the active row for keyboard navigation. This is a controlled prop. See the Keyboard Navigation page for more details.
autoSizeColumnsKey
Controls auto-sizing of columns.
columnDefaultDraggable
Specifies whether columns are draggable by default (for reordering columns).
columnDefaultEditable
Specifies whether columns are editable by default.
columnDefaultSortable
Specifies whether columns are sortable by default.
columnDefaultWidth
Specifies the a default width for all columns.
columnGroupVisibility
Controls the visibility of column groups. By default, column groups are visible.
columnHeaderHeight
The height of the column header.
columnMaxWidth
Specifies the maximum width for all columns.
columnMinWidth
Specifies the minimum width for all columns.
columnOrder
Defines the order in which columns are displayed in the component
columns
Describes the columns available in the component.
columns.align
Controls the alignment of text in column cells and also the alignment of the column header. To only apply alignment to the column header, use columns.headerAlign
. For vertical alignment, see columns.verticalAlign
.
columns.className
Controls styling via CSS classes for the column. Can be a string
or a function returning a string
(a valid className).
columns.components
Specifies custom React components to use for column cells or header
columns.components.ColumnCell
Specifies a custom React component to use for column cells
columns.components.Editor
Specifies a custom React component to use for the editor, when editing is enabled for the column.
columns.components.HeaderCell
Specifies a custom React component to use for column headers
columns.contentFocusable
Specifies if the column (or cell, if a function is used) renders content that will/should be focusable (via tab-navigation)
columns.cssEllipsis
Specifies if the column should show ellipsis for content that is too long and does not fit the column width.
columns.dataType
Specifies the type of the data for the column. For now, it's better to simply use columns.type
.
columns.defaultDraggable
Specifies whether the column is draggable by default (for reordering columns).
columns.defaultEditable
Controls if the column is editable or not.
columns.defaultFlex
Specifies a default flex for the column
columns.defaultHiddenWhenGroupedBy
Controls default column visibility when groupBy
is used.
columns.defaultWidth
Specifies a default width for the column
columns.field
Binds the column to the specified data field. It should be a keyof DATA_TYPE
.
columns.filterType
Use this to configure the filter type for the column, when the filterType
needs to be different from the column type
.
columns.getValueToEdit
Allows customizing the value that will be passed to the cell editor when it is displayed (when editing starts).
columns.getValueToPersist
Allows customizing the value that will be persisted when an edit has been accepted.
columns.header
Specifies the column header. Can be a static value or a function that returns a React node.
columns.headerAlign
Controls the alignment of the column header. See related columns.align
and columns.headerCssEllipsis
.
columns.headerClassName
Controls the css class name for the column header. Can be a string or a function returning a string.
columns.headerCssEllipsis
Specifies if the column should show ellipsis in the column header if the header is too long and does not fit the column width.
columns.headerStyle
Controls styling for the column header. Can be a style object or a function returning a style object.
columns.maxWidth
Configures the maximum width for the column.
columns.minWidth
Configures the minimum width for the column.
columns.render
Customizes the rendering of the column. The argument passed to the function is an object of type InfiniteTableColumnCellContextType
columns.renderFilterIcon
Customizes the rendering of the filter icon for the column.
columns.renderGroupIcon
Customizes the rendering of the collapse/expand group icon for group rows. The argument passed to the function is an object of type InfiniteTableColumnCellContextType
columns.renderGroupValue
Customizes the rendering of a group column content, but only for group rows.
columns.renderHeader
A custom rendering function for the column header. Called with an object of type InfiniteTableColumnHeaderParam
.
columns.renderLeafValue
Customizes the rendering of the group column content, but only for non-group rows.
columns.renderMenuIcon
Allows customization of the context menu icon.
columns.renderRowDetailIcon
Renders the row detail expand/collapse icon in the column cell. Only used when master-detail is enabled.
columns.renderSelectionCheckBox
Specifies that the current column will have a selection checkbox - if a function is provided, will be used to customizes the rendering of the checkbox rendered for selection.
columns.renderTreeIcon
Renders the tree expand/collapse icon in the column cells. If you want default behavior, specify true
and the default icon will be used.
columns.renderValue
Customizes the rendering of the column content. The argument passed to the function is an object of type InfiniteTableColumnCellContextType
columns.resizable
Specifies if the current column is resizable or not.
columns.rowspan
Specifies the rowspan for cells on the current column.
columns.shouldAcceptEdit
Function specified for the column, that determines whether to accept an edit or not.
columns.sortable
Specifies the sorting behavior for the current column. Overrides the global sortable
prop.
columns.sortType
Specifies the sort type for the column. See related sortTypes
columns.style
Controls styling for the column. Can be a style object or a function returning a style object.
columns.type
Specifies the column type - a column type is a set of properties that describes the column. Column types allow to easily apply the same properties to multiple columns.
columns.valueFormatter
Customizes the value that will be rendered
columns.valueGetter
Customizes the value that will be rendered
columns.verticalAlign
Controls the vertical alignment of text in column cells. For horizontal alignment, see columns.align
.
columnSizing
Defines the sizing of columns in the grid.
columnSizing.flex
Specifies the flex value for the column.
columnSizing.maxWidth
Specifies the maximum width for a column. Especially useful for flexible columns.
columnSizing.minWidth
Specifies the minimum width for a column. Especially useful for flexible columns.
columnSizing.width
Specifies the fixed width for the column.
columnsTypes.sortable
Specifies the sorting behavior for columns of this type.
columnTypes
Specifies an object that maps column type ids to column types. Column types are used to apply the same configuration/properties to multiple columns. See related columns.type
columnTypes.components
See related columns.components
.
columnTypes.defaultFlex
Specifies a default flex value for the column type. Will be overriden in any column that already specifies a defaultFlex
property.
columnTypes.defaultSortable
Specifies whether columns of this type are sortable.
columnTypes.defaultWidth
Specifies a default fixed width for the column type. Will be overriden in any column that already specifies a defaultWidth
property.
columnTypes.headerClassName
Controls styling for the column header for columns with this column type. Can be a string or a function returning a string.
columnTypes.headerStyle
Controls styling for the column header for columns with this column type. Can be a style object or a function returning a style object.
columnTypes.maxWidth
Specifies a default maximum width for the column type. Will be overriden in any column that already specifies a maxWidth
property.
columnTypes.minWidth
Specifies a default minimum width for the column type. Will be overriden in any column that already specifies a minWidth
property.
components
Components to override the default ones used by the DataGrid.
components.LoadMask
Allows customising the LoadMask
displayed over the DataGrid when it's loading data.
components.RowDetail
Component to use for rendering the row details section in the master-detail DataGrid. When specified, it makes InfiniteTable be a master-detail DataGrid. For configuring the height of row details, see rowDetailHeight
defaultActiveCellIndex
Specifies the active cell for keyboard navigation. This is an uncontrolled prop. See the Keyboard Navigation page for more details.
defaultActiveRowIndex
Specifies the active row for keyboard navigation. This is an uncontrolled prop. See the Keyboard Navigation page for more details.
defaultColumnOrder
Defines the order in which columns are displayed in the component.
defaultColumnSizing
Defines a default sizing of columns in the grid.
defaultColumnSizing.flex
Specifies the flex value for the column.
defaultColumnSizing.maxWidth
Specifies the maximum width for a column. Especially useful for flexible columns.
defaultColumnSizing.minWidth
Specifies the minimum width for a column. Especially useful for flexible columns.
defaultColumnSizing.width
Specifies the fixed width for the column.
defaultRowDetailState
Specifies the default expanded/collapsed state of row details.
domProps
DOM properties to be applied to the component root element.
draggableColumns
Specifies whether columns are draggable (for reordering columns).
editable
Controls whether columns are editable or not.
focusedClassName
CSS class name to be applied to the component root element when it has focus.
focusedStyle
Specifies the style
to be applied to the component root element when it has focus.
focusedWithinClassName
CSS class name to be applied to the component root element when there is focus within (inside) the component.
focusedWithinStyle
Specifies the style
to be applied to the component root element when there is focus within (inside) the component.
getCellContextMenuItems
Customises the context menu items for a cell.
getColumnMenuItems
Allows customization of the context menu items for a column.
getContextMenuItems
Customises the context menu items for the whole table.
groupColumn
Allows you to define a custom configuration for one or multiple group columns. When this prop is defined, it gets merged onto any values specified in the groupBy.column
property.
groupRenderStrategy
Determines how grouping is rendered - whether a single or multiple columns are generated.
headerOptions
Various header configurations for the DataGrid.
headerOptions.alwaysReserveSpaceForSortIcon
Whether to reserve space in the column header for the sort icon or not.
hideColumnWhenGrouped
Allows you to hide group columns bound to fields that are grouped by (fields mentioned in groupBy.field
).
hideEmptyGroupColumns
Allows you to hide group columns which don't render any information (this happens when all previous groups are collapsed).
isRowDetailEnabled
Decides on a per-row basis if the row details are enabled or not. See Master Detail for more information.
isRowDetailExpanded
This function ultimately decides if a row detail is expanded or not.
keyboardNavigation
Determines whether keyboard navigation is enabled.
keyboardSelection
Determines whether the keyboard can be used for selecting/deselecting rows/cells.
keyboardShortcuts
An array that specifies the keyboard shortcuts for the DataGrid.
loadingText
The text inside the load mask - displayed when loading=true
.
multiSortBehavior
Specifies the behavior of the DataGrid when multiple sorting is configured. Defaults to 'replace'
.
onActiveCellIndexChange
Callback triggered by cell navigation. See the Keyboard Navigation page for more details.
onActiveRowIndexChange
Callback triggered by row navigation. See the Keyboard Navigation page for more details.
onBlurWithin
Function that is called when a focused element is blurred within the component.
onCellClick
Callback function called when a cell has been clicked.
onColumnOrderChange
Called as a result of user changing the column order
onColumnSizingChange
Called as a result of user doing a column resize.
onEditAccepted
Callback prop called when an edit is accepted
onEditPersistSuccess
Callback prop called when an edit is persisted successfully
onEditRejected
Callback prop called when an edit is rejected
onFocusWithin
Function that is called when the table receives focus within the component.
onKeyDown
Callback function called when the keydown
event occurs on the table.
onReady
Callback prop that is being called when the table is ready.
onRenderRangeChange
Called whenever the render range changes, that is, additional rows or columns come into view.
onRowDetailStateChange
Called when the expand/collapse state of row details changes.
onScrollStop
Triggered when the user has stopped scrolling (after scrollStopDelay
milliseconds).
onScrollToBottom
Triggered when the user has scrolled to the bottom of the component. Also see onScrollToTop
and onScrollStop
.
onViewportReservedWidthChange
Callback to be notified of changes to viewportReservedWidth
persistEdit
Custom function to persist an edit
pivotGrandTotalColumnPosition
Controls the position and visibility of pivot grand-total columns
pivotTotalColumnPosition
Controls the position and visibility of pivot total columns
repeatWrappedGroupRows
When enabled, and wrapRowsHorizontally
is also enabled, if there is grouping configured or if you're using tree data, the group/tree rows will be repeated at the top of each column set if the group/parent starts in the previous column set.
resizableColumns
Controls if by default all columns are resizable or not.
rowClassName
Specifies the className to be applied to all rows or conditionally to certain rows.
rowDetailCache
Controls the caching of detail DataGrids. By default, caching is disabled.
rowDetailHeight
Controls the height of the row details section, in master-detail DataGrids.
rowDetailRenderer
When specified, it makes InfiniteTable be a master-detail DataGrid. For configuring the height of row details, see rowDetailHeight
. See related components.RowDetail
.
rowDetailState
Specifies the expanded/collapsed state of row details.
rowHeight
Specifies the height for rows. If a string is passed, it should be the name of a CSS variable, eg --row-height
rowStyle
Specifies the style object to be applied to all rows or conditionally to certain rows.
scrollStopDelay
The delay in milliseconds that the DataGrid waits until it considers scrolling to be stopped. Also used when lazy loading is to fetch the next batch of data.
scrollTopKey
Determines scrolling the table to the top.
shouldAcceptEdit
Function used to validate edits for all columns.
showColumnFilters
Whether to show the column filters or not (only applicable when the <DataSource>
is configured with filtering - either with defaultFilterValue
or filterValue
).
sortable
This prop is the ultimate source of truth on whether (and which) columns are sortable.
viewportReservedWidth
Specifies the width of the space to be kept as blank - useful when there are flex columns. This number can even be negative.
virtualizeColumns
Configures whether columns are virtualized or not
wrapRowsHorizontally
Whether to wrap rows horizontally or not. Horizontal Layout is a very different approach to the normal grid layout and only useful in very advanced scenarios.