material-react-table 2.5.2 → 2.6.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.d.ts +16 -10
- package/dist/index.esm.js +116 -59
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +116 -58
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/body/MRT_TableBody.tsx +25 -9
- package/src/body/MRT_TableBodyCell.tsx +10 -6
- package/src/body/MRT_TableBodyRow.tsx +13 -10
- package/src/body/MRT_TableDetailPanel.tsx +25 -10
- package/src/buttons/MRT_ExpandButton.tsx +16 -4
- package/src/footer/MRT_TableFooterCell.tsx +10 -2
- package/src/head/MRT_TableHeadCell.tsx +9 -3
- package/src/head/MRT_TableHeadRow.tsx +1 -1
- package/src/hooks/useMRT_DisplayColumns.tsx +10 -0
- package/src/hooks/useMRT_RowVirtualizer.ts +14 -4
- package/src/hooks/useMRT_TableOptions.ts +1 -1
- package/src/inputs/MRT_SelectCheckbox.tsx +4 -3
- package/src/style.utils.ts +6 -1
- package/src/table/MRT_Table.tsx +1 -3
- package/src/toolbar/MRT_BottomToolbar.tsx +1 -1
- package/src/toolbar/MRT_TablePagination.tsx +8 -4
@@ -7,7 +7,9 @@ import PaginationItem from '@mui/material/PaginationItem';
|
|
7
7
|
import Select, { type SelectProps } from '@mui/material/Select';
|
8
8
|
import Tooltip from '@mui/material/Tooltip';
|
9
9
|
import Typography from '@mui/material/Typography';
|
10
|
+
import { useTheme } from '@mui/material/styles';
|
10
11
|
import { parseFromValuesOrFunc } from '../column.utils';
|
12
|
+
import { flipIconStyles } from '../style.utils';
|
11
13
|
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
12
14
|
|
13
15
|
const defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100];
|
@@ -30,6 +32,8 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
30
32
|
table,
|
31
33
|
...rest
|
32
34
|
}: Props<TData>) => {
|
35
|
+
const theme = useTheme();
|
36
|
+
|
33
37
|
const {
|
34
38
|
getPrePaginationRowModel,
|
35
39
|
getState,
|
@@ -177,7 +181,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
177
181
|
onClick={() => setPageIndex(0)}
|
178
182
|
size="small"
|
179
183
|
>
|
180
|
-
<FirstPageIcon />
|
184
|
+
<FirstPageIcon {...flipIconStyles(theme)} />
|
181
185
|
</IconButton>
|
182
186
|
</span>
|
183
187
|
</Tooltip>
|
@@ -190,7 +194,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
190
194
|
onClick={() => setPageIndex(pageIndex - 1)}
|
191
195
|
size="small"
|
192
196
|
>
|
193
|
-
<ChevronLeftIcon />
|
197
|
+
<ChevronLeftIcon {...flipIconStyles(theme)} />
|
194
198
|
</IconButton>
|
195
199
|
</span>
|
196
200
|
</Tooltip>
|
@@ -202,7 +206,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
202
206
|
onClick={() => setPageIndex(pageIndex + 1)}
|
203
207
|
size="small"
|
204
208
|
>
|
205
|
-
<ChevronRightIcon />
|
209
|
+
<ChevronRightIcon {...flipIconStyles(theme)} />
|
206
210
|
</IconButton>
|
207
211
|
</span>
|
208
212
|
</Tooltip>
|
@@ -215,7 +219,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
215
219
|
onClick={() => setPageIndex(numberOfPages - 1)}
|
216
220
|
size="small"
|
217
221
|
>
|
218
|
-
<LastPageIcon />
|
222
|
+
<LastPageIcon {...flipIconStyles(theme)} />
|
219
223
|
</IconButton>
|
220
224
|
</span>
|
221
225
|
</Tooltip>
|