Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] New Toolbar component #14611

Open
wants to merge 165 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 143 commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
658c881
[DataGrid] Experimental toolbar
KenanYusuf Sep 13, 2024
cbf114e
fix build
KenanYusuf Sep 13, 2024
a363c4b
codegen
KenanYusuf Sep 13, 2024
a789cec
Merge branch 'master' into experimental-toolbar
KenanYusuf Sep 13, 2024
94cf2db
fix import
KenanYusuf Sep 13, 2024
dfcae22
anchor grid panel to filter/columns buttons
KenanYusuf Sep 18, 2024
ed540c5
export GridToolbarV8
KenanYusuf Sep 18, 2024
370af60
popover slot
KenanYusuf Sep 18, 2024
0a57490
animate filter and columns panels
KenanYusuf Sep 18, 2024
ef8f266
fix panel animation transform origin
KenanYusuf Sep 18, 2024
a96e5fc
Merge branch 'master' into experimental-toolbar
KenanYusuf Sep 20, 2024
b1d2eb2
improve composition
KenanYusuf Sep 20, 2024
9e84da1
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 1, 2024
cf939e9
export parts
KenanYusuf Nov 1, 2024
b7c8f44
update column icon
KenanYusuf Nov 4, 2024
76ba05e
update density item
KenanYusuf Nov 4, 2024
e7ed369
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 5, 2024
206faaa
docs
KenanYusuf Nov 5, 2024
cfee71e
Merge branch 'mui:master' into experimental-toolbar
KenanYusuf Nov 5, 2024
fe3f01d
GridToolbarButton
KenanYusuf Nov 6, 2024
2c7b3c8
docs concept
KenanYusuf Nov 6, 2024
31820e7
Add examples
KenanYusuf Nov 7, 2024
d5048c4
improve demos
KenanYusuf Nov 7, 2024
dbdada0
improve demos
KenanYusuf Nov 7, 2024
5ac669e
undo some changes
KenanYusuf Nov 7, 2024
3718ecb
fix demos
KenanYusuf Nov 7, 2024
0e15924
update description
KenanYusuf Nov 7, 2024
e0bfa62
expanded button styles
KenanYusuf Nov 7, 2024
e7ab35e
use toggle button under the hood for the toolbar button
KenanYusuf Nov 7, 2024
eace306
update docs
KenanYusuf Nov 7, 2024
090ebc2
fix button props
KenanYusuf Nov 7, 2024
3a0cc25
update toggle group example
KenanYusuf Nov 7, 2024
9d74c74
fix typo
KenanYusuf Nov 7, 2024
acb9fac
break sentence onto new line
KenanYusuf Nov 8, 2024
1833e8e
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 13, 2024
5855682
move v8 toolbar to separate folder
KenanYusuf Nov 13, 2024
1647cda
rename spread
KenanYusuf Nov 14, 2024
1840154
declarative toolbar interactions
KenanYusuf Nov 14, 2024
3801949
update filter bar example
KenanYusuf Nov 14, 2024
06d5c21
Grid components
KenanYusuf Nov 15, 2024
8574d88
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 18, 2024
b23080a
update basic toolbar demo
KenanYusuf Nov 18, 2024
cf78651
delete density menu
KenanYusuf Nov 19, 2024
0bd0f67
add export options to export trigger
KenanYusuf Nov 22, 2024
831757a
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 22, 2024
6c46f21
fix onClick prop
KenanYusuf Nov 25, 2024
d03b5cc
style toolbar button
KenanYusuf Nov 25, 2024
5b47719
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 26, 2024
973e02d
update useGridComonentRenderer to merge certain props
KenanYusuf Nov 27, 2024
2ac3298
various minor updates
KenanYusuf Nov 27, 2024
ae6400e
docs updates
KenanYusuf Nov 27, 2024
2532d3e
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 28, 2024
afffa0f
add demo container for data grid components
KenanYusuf Nov 28, 2024
7d830b2
Update toolbar docs
KenanYusuf Nov 28, 2024
670fca0
update styles
KenanYusuf Nov 28, 2024
fef5ad5
fix focus styles for toolbar button
KenanYusuf Nov 28, 2024
0fe1a5d
improve default toolbar example
KenanYusuf Nov 28, 2024
f4c9226
update grid classes
KenanYusuf Nov 28, 2024
9d98f2e
normalize icons
KenanYusuf Nov 28, 2024
40a0b51
docs:api
KenanYusuf Nov 28, 2024
f012c29
update toolbar demo
KenanYusuf Nov 28, 2024
1fa341a
pointer-events: none; on quick filter search icon
KenanYusuf Nov 28, 2024
172db4f
use loading state from demo data
KenanYusuf Nov 28, 2024
570b637
reset changes to preferences panel
KenanYusuf Nov 28, 2024
9a299af
update view icons
KenanYusuf Nov 28, 2024
f544cd7
add class to toggle button group
KenanYusuf Nov 28, 2024
5dda068
update quick filter border color
KenanYusuf Nov 29, 2024
f3a46dd
Merge branch 'master' into experimental-toolbar
KenanYusuf Nov 29, 2024
887bf51
limit columns on toolbar demos
KenanYusuf Nov 29, 2024
a47cd74
doc updatse
KenanYusuf Dec 2, 2024
37204a1
changed wording
KenanYusuf Dec 2, 2024
8b1755e
fix demo container
KenanYusuf Dec 2, 2024
b29a245
remove overflow from toolbar
KenanYusuf Dec 2, 2024
824ad70
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 4, 2024
6f15efd
improve wording
KenanYusuf Dec 4, 2024
cc047e6
remove unnecessary type
KenanYusuf Dec 5, 2024
fed2fe0
provide state to className prop
KenanYusuf Dec 5, 2024
c9fbc00
minor style changes
KenanYusuf Dec 5, 2024
72c9e3e
fix demo
KenanYusuf Dec 5, 2024
8e39938
fix example
KenanYusuf Dec 5, 2024
7394d92
Update docs wording
KenanYusuf Dec 6, 2024
323f27b
use render props for toolbar parts
KenanYusuf Dec 6, 2024
3bb5075
update docs
KenanYusuf Dec 6, 2024
1d03444
support excel export
KenanYusuf Dec 6, 2024
59bd3e1
Component API pages
KenanYusuf Dec 6, 2024
7aad32b
fix build
KenanYusuf Dec 6, 2024
d706535
fix test
KenanYusuf Dec 6, 2024
2982e00
fix test
KenanYusuf Dec 6, 2024
009bfbe
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 6, 2024
918f892
update docs
KenanYusuf Dec 9, 2024
4557963
lint
KenanYusuf Dec 9, 2024
4fab879
remove disableAd
KenanYusuf Dec 11, 2024
ef4b122
Apply suggestions from code review
KenanYusuf Dec 12, 2024
5133ce7
return jsx from useGridComponentRenderer instead of a function
KenanYusuf Dec 12, 2024
6bac61b
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 12, 2024
69fb092
fix toolbar separator classname slot
KenanYusuf Dec 12, 2024
038d646
keyboard navigation
KenanYusuf Dec 13, 2024
c1f376d
use toolbar orientation on separator
KenanYusuf Dec 13, 2024
afc4d4f
remove styles from subcomponents
KenanYusuf Dec 13, 2024
6478ded
use slots for default elements
KenanYusuf Dec 13, 2024
14d9c91
update doc
KenanYusuf Dec 13, 2024
65318ef
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 16, 2024
7d7d895
remaining toolbar slots
KenanYusuf Dec 16, 2024
aa9c393
remove unused style
KenanYusuf Dec 16, 2024
d8dec4f
normalize button styles
KenanYusuf Dec 16, 2024
fa9ace2
sort imports
KenanYusuf Dec 16, 2024
ea374fa
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 16, 2024
c6951af
use args instead of object for useGridComponentRenderer
KenanYusuf Dec 16, 2024
d7c48b7
fix build
KenanYusuf Dec 16, 2024
4c1e4c5
fix types
KenanYusuf Dec 16, 2024
23d8625
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 17, 2024
c23a4b5
reset quick filter file
KenanYusuf Dec 17, 2024
2b970ba
separate export triggers
KenanYusuf Dec 17, 2024
53ffc1c
refactor toolbar
KenanYusuf Dec 17, 2024
fc79365
remove unused code
KenanYusuf Dec 17, 2024
d2f41b9
remove more unused code
KenanYusuf Dec 17, 2024
88835b0
classes
KenanYusuf Dec 17, 2024
66d6c57
docs:api
KenanYusuf Dec 17, 2024
f05d65b
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 17, 2024
bdb4025
design agnostic slot props
KenanYusuf Dec 17, 2024
b678b27
remove toolbar context from demo container
KenanYusuf Dec 17, 2024
5b8ee69
update pro import
KenanYusuf Dec 18, 2024
64af410
remove unused demo
KenanYusuf Dec 18, 2024
76fd657
reset more files
KenanYusuf Dec 18, 2024
8c11fcd
fix build
KenanYusuf Dec 18, 2024
2a49afd
remove more unused components
KenanYusuf Dec 18, 2024
a0a2cae
add settings menu example
KenanYusuf Dec 18, 2024
c47155b
composable quick filter
KenanYusuf Dec 19, 2024
d649dec
docs
KenanYusuf Dec 20, 2024
4a9a970
fix types
KenanYusuf Dec 20, 2024
3da0eae
Merge branch 'master' into experimental-toolbar
KenanYusuf Dec 24, 2024
83d3dc0
tailwind demos
KenanYusuf Dec 24, 2024
95f7d64
update demos
KenanYusuf Dec 24, 2024
6be7b5e
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 3, 2025
611ad3a
docs improvements
KenanYusuf Jan 3, 2025
326e81f
improve docs
KenanYusuf Jan 6, 2025
e5b947b
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 6, 2025
0f8f9a4
refactor toolbar and demos
KenanYusuf Jan 6, 2025
7facd64
fix build
KenanYusuf Jan 6, 2025
259c1fc
replace usages of React.forwardRef
KenanYusuf Jan 6, 2025
9f8f8ee
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 9, 2025
346b04b
refactor
KenanYusuf Jan 10, 2025
d9cec1b
api docs
KenanYusuf Jan 10, 2025
2415af4
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 10, 2025
19b0b6a
remove theme usage
KenanYusuf Jan 10, 2025
019a197
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 13, 2025
f68c9fb
refactor
KenanYusuf Jan 13, 2025
b4f22f1
fix api links
KenanYusuf Jan 13, 2025
ab36a17
fix
KenanYusuf Jan 13, 2025
fbd6062
docs
KenanYusuf Jan 14, 2025
60f6346
lint
KenanYusuf Jan 14, 2025
fcb4f9a
docs
KenanYusuf Jan 14, 2025
a4152de
tw demo
KenanYusuf Jan 14, 2025
95de00a
ignore tw warning
KenanYusuf Jan 14, 2025
365c3e1
fixes
KenanYusuf Jan 15, 2025
a6d5af6
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 15, 2025
d4f974e
docs
KenanYusuf Jan 16, 2025
f235ac8
docs
KenanYusuf Jan 16, 2025
a9e4558
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 16, 2025
24fc5a2
fix
KenanYusuf Jan 16, 2025
bd68a81
minor improvements to useGridComponentRenderer
KenanYusuf Jan 16, 2025
db41624
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 16, 2025
c9b2919
docs
KenanYusuf Jan 17, 2025
013c677
Merge branch 'master' into experimental-toolbar
KenanYusuf Jan 17, 2025
860ccb6
docs
KenanYusuf Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ module.exports = {
'!@mui/internal-*/**',

// Exceptions (QUESTION: Keep or remove?)
'!@mui/x-data-grid/internals/demo',
'!@mui/x-date-pickers/internals/demo',
'!@mui/x-tree-view/hooks/useTreeViewApiRef',
// TODO: export this from /ButtonBase in core. This will break after we move to package exports
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import * as React from 'react';
import { DataGrid } from '@mui/x-data-grid';
import { Toolbar, ColumnsPanel } from '@mui/x-data-grid/primitives';
import { useDemoData } from '@mui/x-data-grid-generator';
import Tooltip from '@mui/material/Tooltip';
import ViewColumnIcon from '@mui/icons-material/ViewColumn';

function CustomToolbar() {
return (
<Toolbar.Root>
<Tooltip title="Columns">
<ColumnsPanel.Trigger render={<Toolbar.Button />}>
<ViewColumnIcon fontSize="small" />
</ColumnsPanel.Trigger>
</Tooltip>
</Toolbar.Root>
);
}

export default function GridColumnsPanelTrigger() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 10,
});

return (
<div style={{ height: 400, width: '100%' }}>
<DataGrid {...data} loading={loading} slots={{ toolbar: CustomToolbar }} />
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import * as React from 'react';
import { DataGrid } from '@mui/x-data-grid';
import { Toolbar, ColumnsPanel } from '@mui/x-data-grid/primitives';
import { useDemoData } from '@mui/x-data-grid-generator';
import Tooltip from '@mui/material/Tooltip';
import ViewColumnIcon from '@mui/icons-material/ViewColumn';

function CustomToolbar() {
return (
<Toolbar.Root>
<Tooltip title="Columns">
<ColumnsPanel.Trigger render={<Toolbar.Button />}>
<ViewColumnIcon fontSize="small" />
</ColumnsPanel.Trigger>
</Tooltip>
</Toolbar.Root>
);
}

export default function GridColumnsPanelTrigger() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 10,
});

return (
<div style={{ height: 400, width: '100%' }}>
<DataGrid {...data} loading={loading} slots={{ toolbar: CustomToolbar }} />
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<DataGrid {...data} loading={loading} slots={{ toolbar: CustomToolbar }} />
54 changes: 54 additions & 0 deletions docs/data/data-grid/primitives/columns-panel/columns-panel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: React Data Grid - Columns Panel component
productId: x-data-grid
components: ColumnsPanelTrigger
packageName: '@mui/x-data-grid'
githubLabel: 'component: data grid'
---

# Data Grid - Columns Panel 🚧

<p class="description">Customize the columns panel UI.</p>

:::warning
This component is incomplete.

Currently, the only part available for the Columns Panel component is the Trigger. In the future, this component will allow you to extend the Data Grid's columns panel.

Check warning on line 16 in docs/data/data-grid/primitives/columns-panel/columns-panel.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/data/data-grid/primitives/columns-panel/columns-panel.md", "range": {"start": {"line": 16, "column": 114}}}, "severity": "WARNING"}

In the meantime, see the following:

- [Custom subcomponents—Columns panel](/x/react-data-grid/components/#columns-panel)

:::

## Basic usage

The demo below shows how to add a columns panel trigger to a custom toolbar.

{{"demo": "GridColumnsPanelTrigger.js", "bg": "inline", "defaultCodeOpen": false}}

## Anatomy

```tsx
import { ColumnsPanel } from '@mui/x-data-grid/primitives';

<ColumnsPanel.Trigger />;
```

### Trigger

A button that opens the columns panel.

Renders the `baseButton` slot.

## Custom elements

The default elements can be replaced using the `render` prop. See [Grid components—Customization](/x/react-data-grid/components/overview/#customization).

See the [Toolbar—Custom elements demo](/x/react-data-grid/primitives/toolbar/#custom-elements) for an example.

## Accessibility

### ARIA

- The element rendered by the `<ColumnsPanel.Trigger />` component should have a text label, or an `aria-label` attribute set.
69 changes: 69 additions & 0 deletions docs/data/data-grid/primitives/export/GridExportMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import * as React from 'react';
import { DataGridPremium } from '@mui/x-data-grid-premium';
import { Toolbar, Export } from '@mui/x-data-grid-premium/primitives';
import { useDemoData } from '@mui/x-data-grid-generator';
import Tooltip from '@mui/material/Tooltip';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import FileDownloadIcon from '@mui/icons-material/FileDownload';

function ExportMenu() {
const [open, setOpen] = React.useState(false);
const triggerRef = React.useRef(null);

return (
<React.Fragment>
<Tooltip title="Export">
<Toolbar.Button
ref={triggerRef}
id="export-menu-trigger"
aria-controls="export-menu"
aria-haspopup="true"
aria-expanded={open ? 'true' : undefined}
onClick={() => setOpen(true)}
>
<FileDownloadIcon fontSize="small" />
</Toolbar.Button>
</Tooltip>
<Menu
id="export-menu"
anchorEl={triggerRef.current}
open={open}
onClose={() => setOpen(false)}
MenuListProps={{
'aria-labelledby': 'export-menu-trigger',
}}
>
<Export.Csv render={<MenuItem />}>Download as CSV</Export.Csv>
<Export.Excel render={<MenuItem />}>Download as Excel</Export.Excel>
<Export.Print render={<MenuItem />}>Print</Export.Print>
</Menu>
</React.Fragment>
);
}

function CustomToolbar() {
return (
<Toolbar.Root>
<ExportMenu />
</Toolbar.Root>
);
}

export default function GridExportMenu() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 10,
});

return (
<div style={{ height: 400, width: '100%' }}>
<DataGridPremium
{...data}
loading={loading}
slots={{ toolbar: CustomToolbar }}
/>
</div>
);
}
69 changes: 69 additions & 0 deletions docs/data/data-grid/primitives/export/GridExportMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import * as React from 'react';
import { DataGridPremium } from '@mui/x-data-grid-premium';
import { Toolbar, Export } from '@mui/x-data-grid-premium/primitives';
import { useDemoData } from '@mui/x-data-grid-generator';
import Tooltip from '@mui/material/Tooltip';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import FileDownloadIcon from '@mui/icons-material/FileDownload';

function ExportMenu() {
const [open, setOpen] = React.useState(false);
const triggerRef = React.useRef<HTMLButtonElement>(null);

return (
<React.Fragment>
<Tooltip title="Export">
<Toolbar.Button
ref={triggerRef}
id="export-menu-trigger"
aria-controls="export-menu"
aria-haspopup="true"
aria-expanded={open ? 'true' : undefined}
onClick={() => setOpen(true)}
>
<FileDownloadIcon fontSize="small" />
</Toolbar.Button>
</Tooltip>
<Menu
id="export-menu"
anchorEl={triggerRef.current}
open={open}
onClose={() => setOpen(false)}
MenuListProps={{
'aria-labelledby': 'export-menu-trigger',
}}
>
<Export.Csv render={<MenuItem />}>Download as CSV</Export.Csv>
<Export.Excel render={<MenuItem />}>Download as Excel</Export.Excel>
<Export.Print render={<MenuItem />}>Print</Export.Print>
</Menu>
</React.Fragment>
);
}

function CustomToolbar() {
return (
<Toolbar.Root>
<ExportMenu />
</Toolbar.Root>
);
}

export default function GridExportMenu() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 10,
});

return (
<div style={{ height: 400, width: '100%' }}>
<DataGridPremium
{...data}
loading={loading}
slots={{ toolbar: CustomToolbar }}
/>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<DataGridPremium
{...data}
loading={loading}
slots={{ toolbar: CustomToolbar }}
/>
38 changes: 38 additions & 0 deletions docs/data/data-grid/primitives/export/GridExportTrigger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import * as React from 'react';
import { DataGrid } from '@mui/x-data-grid';
import { Toolbar, Export } from '@mui/x-data-grid/primitives';
import { useDemoData } from '@mui/x-data-grid-generator';
import Tooltip from '@mui/material/Tooltip';
import FileDownloadIcon from '@mui/icons-material/FileDownload';
import PrintIcon from '@mui/icons-material/Print';

function CustomToolbar() {
return (
<Toolbar.Root>
<Tooltip title="Download as CSV">
<Export.Csv render={<Toolbar.Button />}>
<FileDownloadIcon fontSize="small" />
</Export.Csv>
</Tooltip>
<Tooltip title="Print">
<Export.Print render={<Toolbar.Button />}>
<PrintIcon fontSize="small" />
</Export.Print>
</Tooltip>
</Toolbar.Root>
);
}

export default function GridExportTrigger() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 10,
});

return (
<div style={{ height: 400, width: '100%' }}>
<DataGrid {...data} loading={loading} slots={{ toolbar: CustomToolbar }} />
</div>
);
}
38 changes: 38 additions & 0 deletions docs/data/data-grid/primitives/export/GridExportTrigger.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import * as React from 'react';
import { DataGrid } from '@mui/x-data-grid';
import { Toolbar, Export } from '@mui/x-data-grid/primitives';
import { useDemoData } from '@mui/x-data-grid-generator';
import Tooltip from '@mui/material/Tooltip';
import FileDownloadIcon from '@mui/icons-material/FileDownload';
import PrintIcon from '@mui/icons-material/Print';

function CustomToolbar() {
return (
<Toolbar.Root>
<Tooltip title="Download as CSV">
<Export.Csv render={<Toolbar.Button />}>
<FileDownloadIcon fontSize="small" />
</Export.Csv>
</Tooltip>
<Tooltip title="Print">
<Export.Print render={<Toolbar.Button />}>
<PrintIcon fontSize="small" />
</Export.Print>
</Tooltip>
</Toolbar.Root>
);
}

export default function GridExportTrigger() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 10,
});

return (
<div style={{ height: 400, width: '100%' }}>
<DataGrid {...data} loading={loading} slots={{ toolbar: CustomToolbar }} />
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<DataGrid {...data} loading={loading} slots={{ toolbar: CustomToolbar }} />
Loading
Loading