@redsift/table 10.8.2-muiv5 → 10.9.0-muiv5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -24824,7 +24824,7 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24824
24824
|
onPageChange: propsOnPageChange,
|
|
24825
24825
|
onPageSizeChange: propsOnPageSizeChange,
|
|
24826
24826
|
selectionModel: propsSelectionModel,
|
|
24827
|
-
onSelectionModelChange,
|
|
24827
|
+
onSelectionModelChange: propsOnSelectionModelChange,
|
|
24828
24828
|
page: propsPage,
|
|
24829
24829
|
pageSize: propsPageSize,
|
|
24830
24830
|
pagination,
|
|
@@ -24859,6 +24859,13 @@ const DataGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24859
24859
|
useEffect(() => {
|
|
24860
24860
|
setSelectionModel(propsSelectionModel !== null && propsSelectionModel !== void 0 ? propsSelectionModel : []);
|
|
24861
24861
|
}, [propsSelectionModel]);
|
|
24862
|
+
const onSelectionModelChange = (selectionModel, details) => {
|
|
24863
|
+
if (propsOnSelectionModelChange) {
|
|
24864
|
+
propsOnSelectionModelChange(selectionModel, details);
|
|
24865
|
+
} else {
|
|
24866
|
+
setSelectionModel(selectionModel);
|
|
24867
|
+
}
|
|
24868
|
+
};
|
|
24862
24869
|
const [page, setPage] = React__default.useState((initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat = initialState.pagination) === null || _initialState$paginat === void 0 ? void 0 : _initialState$paginat.page) || propsPage || 0);
|
|
24863
24870
|
const [pageSize, setPageSize] = React__default.useState((initialState === null || initialState === void 0 ? void 0 : (_initialState$paginat2 = initialState.pagination) === null || _initialState$paginat2 === void 0 ? void 0 : _initialState$paginat2.pageSize) || propsPageSize || (rowsPerPageOptions === null || rowsPerPageOptions === void 0 ? void 0 : rowsPerPageOptions[0]) || 100);
|
|
24864
24871
|
const selectionStatus = useRef({
|