Skip to main content
Demo

Minimal usage

data

data is an array of object. A column for each keys of each object will be automatically displayed.

Advanced usage

columns

columns forces the columns you want and format their rows content. It’s an array of objects with following attributes:
  • key is the name of the object key in your data. This example should displys three columns “label”, “value” and “anotherValue” but with this configuration will display only the two first columns.
  • label is the text displayed in column header. It can be as string or a localized string. This example wil show two columns with translated name:
  • description displays a tooltip with a (i) button next to the column name.
  • type change the value type. Default is string but you can force a type to get a specific display. Type can take a value from:
    • string
    • number
    • boolean
    • date
    • tags
  • format can format a number or a date value with a custom format. Value can be:
  • sortable set if the column can be sorted. Default is true. If false, the column header cannot be clicked.

loading

loading display a placeholder while loading data from an automation. Update the value while sending the data:

pagination

pagination set the pagination which can be managed on client side with the current data list or on server side by exchanging events. It’s an object with the following options:
  • event is the event send when clicking a button in the pagination component. It takes page attribute in payload.
  • payload is a custom payload which will be merged with the page value when sending the event.
  • page is the current displayed page.
  • itemCount is the total of items. It’s mandatory to display the correct number of pages.
  • pageSize is the number of items per page. Default is 10.
If you have a lot of data in a single load, so without server side pagination, but you want to display only a few lines at a time, you can set a client side pagination by filling any of this options but event.

displayPerPage

displayPerPage display the “items per page” selector. Value can be true or an array of number you want to propose to your user. Default is [10, 20, 50, 100].

onSort

onSort is an event name fired when clicking a sortable column header. It can be a string or an object with event and payload.

bulkActions

When bulkActions is set, rows can be selected and a menu with actions set in this attribute will be displayed. Value is an array of object containing:
  • onSelect is an event name or on object with event and payload.
  • label is the label displayed. Value is a string or a localized string

onBulkChange

onBulkChange is an event name or on object with event and payload fired each time the bulk selection changes. USefull if you want to change something in your interface when a selection exists.
The event payload contains selectedRowKeys and selectedRows. First one is an array of selected row keys, the other is an array of selected items data.

resetSelectionOn

resetSelectionOn is an event which will reset the bulk selection when fired. Usefull after an action in bulk actions menu is clicked.