material-react-table 3.0.0-rc.0 → 3.0.1
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/dist/index.esm.js +26 -29
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +26 -30
- package/dist/index.js.map +1 -1
- package/locales/no/index.esm.js +1 -1
- package/locales/no/index.js +1 -1
- package/package.json +1 -1
- package/src/components/table/MRT_TablePaper.tsx +48 -51
- package/src/components/toolbar/MRT_TablePagination.tsx +1 -4
- package/src/locales/no.ts +2 -1
package/dist/index.esm.js
CHANGED
@@ -50,7 +50,6 @@ import ViewColumnIcon from '@mui/icons-material/ViewColumn';
|
|
50
50
|
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
51
51
|
import { defaultRangeExtractor, useVirtualizer } from '@tanstack/react-virtual';
|
52
52
|
import Paper from '@mui/material/Paper';
|
53
|
-
import FocusTrap from '@mui/material/Unstable_TrapFocus/FocusTrap';
|
54
53
|
import TableContainer from '@mui/material/TableContainer';
|
55
54
|
import Table from '@mui/material/Table';
|
56
55
|
import TableBody from '@mui/material/TableBody';
|
@@ -3913,7 +3912,7 @@ const MRT_TablePagination = (_a) => {
|
|
3913
3912
|
const theme = useTheme();
|
3914
3913
|
const isMobile = useMediaQuery('(max-width: 720px)');
|
3915
3914
|
const { getState, options: { enableToolbarInternalActions, icons: { ChevronLeftIcon, ChevronRightIcon, FirstPageIcon, LastPageIcon }, id, localization, muiPaginationProps, paginationDisplayMode, }, } = table;
|
3916
|
-
const { pagination: { pageIndex = 0, pageSize = 10 },
|
3915
|
+
const { pagination: { pageIndex = 0, pageSize = 10 }, } = getState();
|
3917
3916
|
const paginationProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiPaginationProps, {
|
3918
3917
|
table,
|
3919
3918
|
})), rest);
|
@@ -3936,9 +3935,7 @@ const MRT_TablePagination = (_a) => {
|
|
3936
3935
|
gap: '8px',
|
3937
3936
|
justifyContent: { md: 'space-between', sm: 'center' },
|
3938
3937
|
justifySelf: 'flex-end',
|
3939
|
-
mt: position === 'top' &&
|
3940
|
-
enableToolbarInternalActions &&
|
3941
|
-
!showGlobalFilter
|
3938
|
+
mt: position === 'top' && enableToolbarInternalActions
|
3942
3939
|
? '3rem'
|
3943
3940
|
: undefined,
|
3944
3941
|
position: 'relative',
|
@@ -4316,30 +4313,30 @@ const MRT_TablePaper = (_a) => {
|
|
4316
4313
|
const { isFullScreen } = getState();
|
4317
4314
|
const paperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTablePaperProps, { table })), rest);
|
4318
4315
|
const theme = useTheme();
|
4319
|
-
return (
|
4320
|
-
|
4321
|
-
|
4322
|
-
|
4323
|
-
|
4324
|
-
|
4325
|
-
|
4326
|
-
|
4327
|
-
|
4328
|
-
|
4329
|
-
|
4330
|
-
|
4331
|
-
|
4332
|
-
|
4333
|
-
|
4334
|
-
|
4335
|
-
|
4336
|
-
|
4337
|
-
|
4338
|
-
|
4339
|
-
|
4340
|
-
|
4341
|
-
|
4342
|
-
|
4316
|
+
return (jsxs(Paper, Object.assign({ elevation: 2, onKeyDown: (e) => e.key === 'Escape' && table.setIsFullScreen(false) }, paperProps, { ref: (ref) => {
|
4317
|
+
tablePaperRef.current = ref;
|
4318
|
+
if (paperProps === null || paperProps === void 0 ? void 0 : paperProps.ref) {
|
4319
|
+
//@ts-ignore
|
4320
|
+
paperProps.ref.current = ref;
|
4321
|
+
}
|
4322
|
+
}, style: Object.assign(Object.assign({}, (isFullScreen
|
4323
|
+
? {
|
4324
|
+
bottom: 0,
|
4325
|
+
height: '100dvh',
|
4326
|
+
left: 0,
|
4327
|
+
margin: 0,
|
4328
|
+
maxHeight: '100dvh',
|
4329
|
+
maxWidth: '100dvw',
|
4330
|
+
padding: 0,
|
4331
|
+
position: 'fixed',
|
4332
|
+
right: 0,
|
4333
|
+
top: 0,
|
4334
|
+
width: '100dvw',
|
4335
|
+
zIndex: theme.zIndex.modal,
|
4336
|
+
}
|
4337
|
+
: {})), paperProps === null || paperProps === void 0 ? void 0 : paperProps.style), sx: (theme) => (Object.assign({ backgroundColor: baseBackgroundColor, backgroundImage: 'unset', overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx, theme))), children: [enableTopToolbar &&
|
4338
|
+
((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : (jsx(MRT_TopToolbar, { table: table }))), jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
|
4339
|
+
((_c = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _c !== void 0 ? _c : (jsx(MRT_BottomToolbar, { table: table })))] })));
|
4343
4340
|
};
|
4344
4341
|
|
4345
4342
|
const isTableInstanceProp = (props) => props.table !== undefined;
|