material-table
material-table copied to clipboard
Custom Export function does not include all Data
- I created a custom export function which works except for the fact, that it does not recognise the option "exportAllData" value.
- The data is dependant on the amount of rows rendered
handleExportCsv = (columns, data) => {
// this shoud include all rows right?
console.log(data, 'rows')
}
options={{
columnsButton: true,
exportButton: {
csv: true,
pdf: false,
},
exportFileName: 'export-file',
grouping: false,
actionsColumnIndex: -1,
sorting: false,
exportAllData: true,
loadingType: 'overlay',
pageSize: this.state.pageSize,
pageSizeOptions: [20, 50, 100, 200, 500],
paging: true,
search: false,
tableLayout: 'auto',
draggable: false,
exportCsv: this.handleExportCsv,
}}
data={query =>
new Promise((resolve, reject) => {
// prepare your data and then call resolve like this:
resolve({
data: // your data array
page: // current page number
totalCount: // total row number
});
})
}
Is this not working because my data is queried?
just found out it is due to my data query