[DataGrid] New column management panel design #11770
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #8754
TODOs:
Changelog
Extract columns management component
The columns management component (previously part of Columns Panel) has now been extracted as a separate component and slot with its dedicated
slotProps
. The motivation behind the change is to allow it to be reused in the newly proposed pivoting design (on the right side of the grid, in its dedicated space)Design changes
The design of the columns management component now uses the new checkboxes-based design rather than the previous toggle button-based design.
Component API
The component API is almost the same as that of Columns Panel, with a few exceptions like:
disableResetButton
has been introduced.Show/Hide All
checkbox, related props are also updated.Breaking changes
The columns management component has been redesigned and the component is extracted from the
ColumnsPanel
which now only serves as a wrapper to display the component over the headers as a panel. As a result, a new slotcolumnsManagement
, and corresponding propslotProps.columnsManagement
have been introduced. The props corresponding to the columns management component which were previously passed to the propslotProps.columnsPanel
should now be passed toslotProps.columnsManagement
.slotProps.columnsPanel
could still be used to override props corresponding to thePanel
component used inColumnsPanel
which usesPopper
component under the hood.Show all
andHide all
buttons in theColumnsPanel
have been combined into oneShow/Hide All
checkbox in the new columns management component. The related propsdisableShowAllButton
anddisableHideAllButton
have been replaced with a new propdisableShowHideToggle
.