Skip to main content

Export

Supported type

Here is the list of the typeCell supported by the export feature. We try to render the value as close as possible from the view mode.

typeCellSupportedTypeOutput
AmountYESstringThe formatted value using the formatAmount property.
AttachmentYESstringThe documents URI separated by commas.
AutocompleteYESstringThe selected value. If multiple, the selected values separated by commas.
BadgeYESstringOne of the BADGE_STATUS label (in french).
ButtonNO
CheckboxYESstring'X' if checked and empty string if not.
ChipNO
CustomYESstringIf the data linked to the column is a number or a string, the value is returned. Otherwise, it returns a empty string.
DateYESstringThe formatted value using the outputFormat property.
MultipleNO
NumberYESnumberThe cell value.
SelectYESstringThe selected value label.
StatusYESstringThe selected value label.
StringYESstringThe cell value.
ThumbnailYESstringThe documents URI separated by commas.
WalletYESstringThe list of id from the array object separated by commas.

Custom formating

The renderExport property can be used to intercept any column result. The renderExportFooter property can be used to intercept any footer.

Example

Override the value of the checkbox cell.

// data
{
"isValid": true,
}
// config
{
key: 'isValid',
typeCell: 'check_box',
renderExport: (row, value) => value === 'X' ? 'YES' : 'NO',
renderExportFooter: (column, rows) => ['1', '2', '3']
}

Create a custom value with other data.

// data
{
"debit": 100,
"credit": 50
}
// config
{
key: 'diff',
typeCell: 'custom',
renderExport: ({ debit, credit }) => debit - credit
}

Ignore columns

You can ignore some columns from the export by setting the property ignoreExport: true.

Disable the feature

The export feature is activated by default. To disable it, the following config as to be used.

<VirtualTable
config={
{
...yourConfig,
exportFormat: []
}
}
/>