-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Use new toolbar by default #16814
Conversation
Deploy preview: https://deploy-preview-16814--material-ui-x.netlify.app/ Updated pages: |
@@ -154,8 +154,7 @@ export interface GridSlotsComponent extends GridBaseSlots, GridIconSlotsComponen | |||
*/ | |||
footerRowCount: React.JSXElementConstructor<GridSlotProps['footerRowCount']>; | |||
/** | |||
* Toolbar component rendered inside the Header component. | |||
* @default GridToolbar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think it makes sense to list a default component if it's only available internally
Love the new defaults.
I wonder if we must stop exporting |
This one is mainly a design decision because I don't think that icon fits with the other, much heavier, icons used in the toolbar. Users using the old |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to the examples show how things are getting simpler for the end users 🙂
I found a small issue on some examples. Clicking on the toolbar button changes the scroll position
First demo on this page
https://deploy-preview-16814--material-ui-x.netlify.app/x/react-data-grid/filtering/
@arminmeh I think this might be a bug with the focus trap used here: https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/material/index.tsx#L497-L506 I can replicate it on: https://next.mui.com/x/react-data-grid/filtering/multi-filters/#disable-action-buttons |
OK. Then this can be fixed outside of the scope of this PR |
I haven't seen one specific to the data grid, just found these issues which seem to be related: |
There are a lot of other examples that are having custom buttons on top some examples |
Part of #15823
GridToolbar
component for internal use onlyGridToolbarQuickFilter
component to use the newQuickFilter
componentsFollow-up
showQuickFilter
is nowtrue
by default—we can remove where this is set explicitly in demosChangelog
Breaking changes
density
prop. A density selector can be added to a custom toolbar passed toslots.toolbar
. See Toolbar component—Settings menu for an example.slotProps={{ toolbar: { showQuickFilter: false } }}
to hide it.<GridSaveAltIcon />
icon is not exported anymore. ImportSaveAlt
from@mui/icons-material
instead.