material-react-table 0.23.4 → 0.23.5
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/MaterialReactTable.d.ts +2 -1
- package/dist/material-react-table.cjs.development.js +6 -5
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +6 -5
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/toolbar/MRT_LinearProgressBar.d.ts +1 -1
- package/package.json +1 -1
- package/src/MaterialReactTable.tsx +2 -0
- package/src/toolbar/MRT_LinearProgressBar.tsx +5 -5
- package/src/toolbar/MRT_ToolbarBottom.tsx +1 -1
- package/src/toolbar/MRT_ToolbarTop.tsx +1 -1
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "0.23.
|
2
|
+
"version": "0.23.5",
|
3
3
|
"license": "MIT",
|
4
4
|
"name": "material-react-table",
|
5
5
|
"description": "A fully featured Material UI implementation of TanStack React Table, inspired by material-table and the MUI X DataGrid, written from the ground up in TypeScript.",
|
@@ -439,8 +439,10 @@ export type MaterialReactTableProps<TData extends Record<string, any> = {}> =
|
|
439
439
|
muiLinearProgressProps?:
|
440
440
|
| LinearProgressProps
|
441
441
|
| (({
|
442
|
+
isTopToolbar,
|
442
443
|
table,
|
443
444
|
}: {
|
445
|
+
isTopToolbar: boolean;
|
444
446
|
table: MRT_TableInstance<TData>;
|
445
447
|
}) => LinearProgressProps);
|
446
448
|
muiSearchTextFieldProps?:
|
@@ -3,11 +3,11 @@ import { Collapse, LinearProgress } from '@mui/material';
|
|
3
3
|
import { MRT_TableInstance } from '..';
|
4
4
|
|
5
5
|
interface Props {
|
6
|
-
|
6
|
+
isTopToolbar: boolean;
|
7
7
|
table: MRT_TableInstance;
|
8
8
|
}
|
9
9
|
|
10
|
-
export const MRT_LinearProgressBar: FC<Props> = ({
|
10
|
+
export const MRT_LinearProgressBar: FC<Props> = ({ isTopToolbar, table }) => {
|
11
11
|
const {
|
12
12
|
options: { muiLinearProgressProps },
|
13
13
|
getState,
|
@@ -16,7 +16,7 @@ export const MRT_LinearProgressBar: FC<Props> = ({ alignTo, table }) => {
|
|
16
16
|
|
17
17
|
const linearProgressProps =
|
18
18
|
muiLinearProgressProps instanceof Function
|
19
|
-
? muiLinearProgressProps({ table })
|
19
|
+
? muiLinearProgressProps({ isTopToolbar, table })
|
20
20
|
: muiLinearProgressProps;
|
21
21
|
|
22
22
|
return (
|
@@ -25,9 +25,9 @@ export const MRT_LinearProgressBar: FC<Props> = ({ alignTo, table }) => {
|
|
25
25
|
mountOnEnter
|
26
26
|
unmountOnExit
|
27
27
|
sx={{
|
28
|
-
bottom:
|
28
|
+
bottom: isTopToolbar ? 0 : undefined,
|
29
29
|
position: 'absolute',
|
30
|
-
top:
|
30
|
+
top: !isTopToolbar ? 0 : undefined,
|
31
31
|
width: '100%',
|
32
32
|
}}
|
33
33
|
>
|
@@ -53,7 +53,7 @@ export const MRT_ToolbarBottom: FC<Props> = ({ table }) => {
|
|
53
53
|
} as any)
|
54
54
|
}
|
55
55
|
>
|
56
|
-
<MRT_LinearProgressBar
|
56
|
+
<MRT_LinearProgressBar isTopToolbar={false} table={table} />
|
57
57
|
{positionToolbarAlertBanner === 'bottom' && (
|
58
58
|
<MRT_ToolbarAlertBanner table={table} />
|
59
59
|
)}
|
@@ -103,7 +103,7 @@ export const MRT_ToolbarTop: FC<Props> = ({ table }) => {
|
|
103
103
|
['top', 'both'].includes(positionPagination ?? '') && (
|
104
104
|
<MRT_TablePagination table={table} position="top" />
|
105
105
|
)}
|
106
|
-
<MRT_LinearProgressBar
|
106
|
+
<MRT_LinearProgressBar isTopToolbar table={table} />
|
107
107
|
</Toolbar>
|
108
108
|
);
|
109
109
|
};
|