Skip to main content

Config

Global (Provider)

Table

Properties

NameTypeRequiredDefaultDescription
configobjectYesSee config prop
customFooterComponentNoIf defined, the component is mounted after the default tFooter. To hide the default Footer, set config.hasFooter to false
customHeaderComponentNoIf defined, the component is mounted above the default Header. To hide the default Header, set config.hasHeader to false
dataarrayYes
defaultSelectedRowsarrayNo[]The rows selected on VirtualTable initialization.
handleRowsToDeletefuncNo() => {}Callback fired when the Delete button is clicked. It returns the selected rows. If the function is async, resolving it'll unselect the rows, while rejecting it'll keep the selection intact.
handleValidateAddfuncNo() => {}Callback fired when the Save button is clicked. It returns the newly created rows.
handleValidateEditfuncNo() => {}Callback fired when the Save button is clicked. It returns the edited rows.
isEditfuncNo() => {}Callback fired when table's content changes, it returns a boolean based on whether at least once cell has been modified.
maxHeightstring | numberNo600pxThe maximum height of the VirtualTable.
onColumnsChangefuncNoSee Event
onFilterChangefuncNoSee Event
onFocusChangefuncNoCallback fired when the focus changes inside the VT. It receives an object as only argument: { from: [ rowIndex, columnIndex], to: [ rowIndex, columnIdex ] }.
onRowClickfuncNoSee Event
onRowContextMenufuncNoSee Event
selectRowsfuncNo() => {}Callback fired when a row is selected/unselected. It returns the list of selected rows.
tableKeyNamestringYesString used to created unique IDs in the VirtualTable components.
widthTablestring | numberNo100%The width of the VirtualTable.
columnsConfigobjectNoSee columnsConfig prop

Config prop

NameTypeRequiredDefaultDescription
actionsButtonarrayNo[]Array of actionButton passed to a MenuItem component
addOneByOneboolNofalseIf true, only one "New line" can be created at a time.
addRowLabelstringNo+ Ajouter une ligneDefine label of addRow button
alwaysInEditionboolNofalseIf true, all line are selected to be editable.
columnsarrayNo[]Array of column.
customButtonsarrayNo[]Array of customButton passed to a InlineButton component.
customSelectionHeaderComponentNoOverrides the Toolbar component
defaultOrderstringNoDefine default order being key of one column sortable of the table
defaultOrderDirectionasc | descNoascDefine default order direction
dynamicHeightboolNotrueInfluences the table height calculation.
enableColumnEditionboolNotrueEnable the posibility to hide/display columns.
exportFilenamestringNoexportName of the exported file.
fixedColumnsnumberNo0Number of right fixed columns.
footerStyleobjectNo{}Object used to override the default style of the footerContainer.
hasFooterboolNofalseIf true, the Footer is activated.
hasHeaderboolNotrueIf true, the Header is activated.
hasSearchbarboolNofalseIf true, the SearchBar is activated.
headerHeightnumberNo32Defines the Header component height. The wrapHeaderText prop need to be true.
hideCheckboxbool | FuncNofalseIf true, the checkbox column is hidden (even in interactive mode). If Func checkbox is visible in fuction of ({ rowIndex, row }))
hideStateActionsboolNofalseIf true, the save and cancel buttons are hidden.
hideToolbarboolNofalseIf true, the toolbar is hidden (even in interactive mode).
insertPositiontop | bottomNotopDefine the AddLine component position. It can be placed before or after the cells part.
minCellWidthnumberNo100Minimum width of the cells.
modeAddboolNofalseIf true, the add mode is activated
modeDeleteboolNofalseIf true, the delete mode is activated
modeEditboolNofalseIf true, the edit mode is activated
modeGroupboolNofalseIf true, the VirtualTable processes the data as group
onCustomAddfuncNoCallback fired when the Add button is clicked.
onCustomOrderChangefuncNoCallback fired when we click on column header to sort the data.
onFocusChangefuncNoCallback fired when the focus changes inside the VT. It receives an object as only argument: { from: [ rowIndex, columnIndex], to: [ rowIndex, columnIdex ] }.
onKeyDownfuncNoCallback fired when a keydown event is triggered inside the VT. It receives an three arguments: the event object, the rowIndex and the columnIndex.
rowHeightnumberNo32Defines the rows height.
selectableRowKeystringNoidThe data array primary key.
selectableRowboolNofalseIf true, a selection counter is displayed.
selectableOnlyOneRowboolNofalseIf true, only one row can be selected at a time.
spaceBetweennumberNo2The gutters size in px.
wrapHeaderTextboolNofalseActivates text wrapping on header cells.
isHighlightOnHoverboolNofalseHighlight editable cells on hover

actionsButton

NameTypeRequiredDefaultDescription
labelstringYesString passed as a children to the MenuItem component.
onClickfuncYesCallback fired when the MenuItem is clicked. It receives the rows as only argument.
disabledboolnofalseIf true, the MenuItem is disabled.
iconComponentnoIf defined, the component is inserted before the label.

customButton

The customButton extends the InlineButton buttons property shape. The following properties are intercepted to pass arguments.

NameTypeRequiredDefaultDescription
isDisablefuncNo() => falseFunction whose returned value is passed to the disabled prop. It receives an object as only argument.
onClickfuncNo() => {}Callback fired when the button is clicked. It receives the rows as only argument.

Column common properties

NameTypeRequiredDefaultDescription
alignTextleft | center | rightNoleftThe cell content alignment. This is applied to the header, body and footer part.
alignVerticaltop | center | bottomNocenterThe cell content vertical alignment. This is applied to the header, body and footer part.
editableboolNofalseIf true, the cell content can be edited in edit mode.
footerStyleobjectNo{}Object used to override the default style of the footer cell.
footerValuestring | funcNoElement to display inside the footerCell or a function that returns a Element. This function receives the whole data object as unique argument.
hasContextMenuboolNofalse If true, activated the ContextMenu wrapper component.
headerstringNo''The column title.
isDisabledfuncNo() => falseIf the function returns true, the input is disabled. The function receives the row data as uniq argument
keystringYesUnique key used as a column identifier.
listActionContextMenuarrayNo[]List used to fill the ContextMenu component.
noFooterboolNofalseIf true, the footer cell is not rendered.
showLockInfoboolNofalseIf true, the cell content is still displayed when the line is secured.
sizenumberNoThe grid column value.
sortableboolNoIf true, the column is sortable with a basic algorythm. If false, the column is not sortable. If not undefined, the column is sortable when the type is one of the following: amount, number, string.
onMouseLeavefuncNoApply the onMouseLeave handler to the column cells
onMouseEnterfuncNoApply the onMouseEnter handler to the column cells
tooltipDetailfuncNoDisplay the returned string as a tooltip. Is overridden by tooltipError if defined.
tooltipErrorfuncNoDisplay the returned string as a error tooltip.
tooltipFooterstringNoIf defined, the footerCell is wrapped into a Tooltip with the value of tooltipFooter as text.
typeCellTypeCell | funcNostringRendered cell type. If a function is passed, it receives the rowData as unique argument.
typeFootersum | amountNoApply the predefined cell type to the footer.
widthnumberNoThe width of the column in px.
withLockIconboolNofalseIf true, a locker icon appears at on the left of the cell when the line is secured.

ListActionContextMenu

NameTypeRequiredDefaultDescription
labelstringYesThe displayed label.
actionfuncYesFunction called on item click.
disabled(object) => boolNofalseFunction used to dynamically and conditionnaly disabled option.
itemPropsobjectNo{}Object spreads to the MenuItem component.

columnsConfig prop

NameTypeRequiredDefaultDescription
draggableboolNofalseIf true, the columns is draggable
configarrayYesArray of column.
dataarrayYes
handleValidate() => {}NoCallback fired when the Save button is clicked. It returns updated rows
columnCreationboolNofalseEnable the column creation mode
columnSelectionboolNofalseEnable the column selection mode, work with 'selectable' columns