Skip to content

Commit e9dd9c6

Browse files
authored
Merge pull request #29 from material-table-core/exportAllData_info
document exportAllData
2 parents 0223ecd + daad103 commit e9dd9c6

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

demos/export/basic.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import { InfoBannerAboutGlobalVarsInDemos } from "../../src/components";
1212
You may use default export methods via the package `@material-table/exporters`. You will need to install this package if you would like to use the default export methods.
1313
:::
1414

15+
16+
:::info
17+
The exportAllData options will always export all the passed data, instead of the current shown rows.
18+
:::
19+
20+
1521
```javascript
1622
// ...
1723
import { ExportCsv, ExportPdf } from "@material-table/exporters";
@@ -20,6 +26,7 @@ import { ExportCsv, ExportPdf } from "@material-table/exporters";
2026
// ...
2127
options={{
2228
// ...
29+
exportAllData: true,
2330
exportMenu: [
2431
{
2532
label: "Export PDF",
@@ -49,6 +56,7 @@ function BasicExport() {
4956
columns={DEMO_COLS}
5057
options={{
5158
// ...
59+
exportAllData: true,
5260
exportMenu: [
5361
{
5462
label: "Export PDF",

docs/api/props/options.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ In order to make things easier on you, we have provided the following default ex
1818
You will need to install `@material-table/exporters` to use the "built-in", default export methods
1919
:::
2020

21+
:::info
22+
The exportAllData options will always export all the passed data, instead of the current shown rows.
23+
:::
24+
2125
```javascript
2226
// ...
2327
import { ExportCsv, ExportPdf } from '@material-table/exporters';
@@ -26,6 +30,7 @@ import { ExportCsv, ExportPdf } from '@material-table/exporters';
2630
// ...
2731
options={{
2832
// ...
33+
exportAllData: true,
2934
exportMenu: [{
3035
label: 'Export PDF',
3136
exportFunc: (cols, datas) => ExportPdf(cols, datas, 'myPdfFileName')
@@ -36,6 +41,11 @@ import { ExportCsv, ExportPdf } from '@material-table/exporters';
3641
}}
3742
/>
3843
```
44+
### `exportAllData`
45+
46+
:::info Export all data that is passed to the table
47+
48+
:::
3949

4050
### `exportButton`
4151

0 commit comments

Comments
 (0)