Oct 29, 2021
A big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
- ✨ Allow
valueOptions
fromGridColDef
to accept a function (#2850) @alexfauquette - 💅 Prefix undocumented
apiRef
methods withunsafe_
(#2985) @flaviendelangle - 👁 Unify filtering, sorting, and rows selectors names (#2942) @flaviendelangle
- 💡 Support style overrides added in the theme (#2995) @DanailH
- 📚 Documentation improvements
- 🐞 Bugfixes
@mui/x-data-grid@v5.0.0-beta.6
/ @mui/x-data-grid-pro@v5.0.0-beta.6
Breaking changes
-
[DataGridPro] The following methods from
apiRef
were renamed. Use the provided alternatives. (#2870) @flaviendelangleapiRef.current.applyFilters
was renamed toapiRef.current.unsafe_applyFilters
apiRef.current.applyFilterLinkOperator
was renamed toapiRef.current.setFilterLinkOperator
apiRef.current.upsertFilter
was renamed toapiRef.current.upsertFilterItem
apiRef.current.deleteFilter
was renamed toapiRef.current.deleteFilterItem
-
[DataGridPro] The
apiRef.current.applyFilter
method was removed. (#2870) @flaviendelangle
You should never have to call it directly since the filters are already applied when thefilterModel
prop changes.
To manually apply the filters, useapiRef.current.unsafe_applyFilters
.-apiRef.current.applyFilter +apiRef.current.unsafe_applyFilters
-
[DataGridPro] Rename filtering, sorting, and rows selectors to match the naming convention (#2942) @flaviendelangle
unorderedGridRowIdsSelector
was renamed togridRowIdsSelector
sortingGridStateSelector
was renamed togridSortingStateSelector
sortedGridRowIdsSelector
was renamed togridSortedRowIdsSelector
visibleSortedGridRowIdsSelector
was renamed togridVisibleSortedRowIdsSelector
visibleGridRowCountSelector
was renamed togridVisibleRowCountSelector
filterGridColumnLookupSelector
was renamed togridFilterActiveItemsSelector
-
[DataGridPro] The
sortedGridRowsSelector
was renamed togridSortedRowEntriesSelector
(#2942) @flaviendelangleThe return value was also changed as below:
-sortedGridRowsSelector: (state: GridState) => Map<GridRowId, GridRowModel> -const map = sortedGridRowsSelector(state); +gridSortedRowEntriesSelector: (state: GridState) => GridRowEntry[] +const map = new Map(gridSortedRowEntriesSelector(state).map(row => [row.id, row.model]));
-
[DataGridPro] The
visibleSortedGridRowsSelector
was replaced withgridVisibleSortedRowEntriesSelector
(#2942) @flaviendelangleThe return value was also changed as below:
-visibleSortedGridRowsSelector: (state: GridState) => Map<GridRowId, GridRowModel>; -const map = visibleSortedGridRowsSelector(state); +gridVisibleSortedRowEntriesSelector: (state: GridState) => GridRowEntry[] +const map = new Map(gridVisibleSortedRowEntriesSelector(state).map(row => [row.id, row.model]));
-
[DataGridPro] The
visibleSortedGridRowsAsArraySelector
was replaced withgridVisibleSortedRowEntriesSelector
(#2942) @flaviendelangleThe return value was also changed as below:
-visibleSortedGridRowsAsArraySelector: (state: GridState) => [GridRowId, GridRowData][]; +gridVisibleSortedRowEntriesSelector: (state: GridState) => GridRowEntry[]
-
[DataGridPro] The
filterGridItemsCounterSelector
selector was removed. (#2942) @flaviendelangle
UsegridFilterActiveItemsSelector
as replacement.-const filterCount = filterGridItemsCounterSelector(state); +const filterCount = gridFilterActiveItemsSelector(state).length;
-
[DataGridPro] The
unorderedGridRowModelsSelector
selector was removed. (#2942) @flaviendelangle
UseapiRef.current.getRowModels
orgridRowIdsSelector
andgridRowsLookupSelector
.
Changes
- [DataGrid] Allow
valueOptions
to accept a function (#2850) @alexfauquette - [DataGrid] Add
overridesResolver
(#2995) @DanailH - [DataGrid] Unify filtering, sorting, and rows selectors names (#2942) @flaviendelangle
- [DataGridPro] Prefix undocumented
apiRef
methods withunsafe_
(#2985) @flaviendelangle
Docs
- [docs] Explain how to use MUI X v5 with MUI Core v4 (#2846) @m4theushw
- [docs] Generate docs for components (#2465) @m4theushw
- [docs] Improve
scrollEndThreshold
API docs (#3001) @ZeeshanTamboli - [docs] Fix CodeSandbox and feature request templates (#2986) @flaviendelangle
Core
- [core] Add step for announcing the releases on Twitter (#2997) @DanailH
- [core] Apply all filters to a row before moving to the next one (#2870) @flaviendelangle
- [core] Change monorepo repository URL (#2983) @m4theushw
- [core] Clean Storybook examples (#2805) @flaviendelangle
- [core] Generate list of all grid exports (#2801) @flaviendelangle
- [core] Improve typing of
buildApi.ts
(#2922) @flaviendelangle - [core] Add additional test for
checkboxSelection
toggling (#2979) @flaviendelangle - [test] Fix flaky visual regression test (#2981) @m4theushw