material-react-table 1.2.2 → 1.2.4
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/cjs/MaterialReactTable.d.ts +19 -1
- package/dist/cjs/body/MRT_EditRowModal.d.ts +1 -0
- package/dist/cjs/buttons/MRT_ColumnPinningButtons.d.ts +1 -0
- package/dist/cjs/buttons/MRT_EditActionButtons.d.ts +1 -0
- package/dist/cjs/buttons/MRT_FullScreenToggleButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_GrabHandleButton.d.ts +1 -1
- package/dist/cjs/buttons/MRT_ShowHideColumnsButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_ToggleDensePaddingButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_ToggleFiltersButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_ToggleGlobalFilterButton.d.ts +2 -1
- package/dist/cjs/column.utils.d.ts +4 -3
- package/dist/cjs/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
- package/dist/cjs/index.js +376 -235
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/inputs/MRT_EditCellTextField.d.ts +1 -0
- package/dist/cjs/inputs/MRT_GlobalFilterTextField.d.ts +1 -0
- package/dist/cjs/menus/MRT_FilterOptionMenu.d.ts +1 -0
- package/dist/cjs/menus/MRT_ShowHideColumnsMenu.d.ts +1 -0
- package/dist/cjs/table/MRT_TableRoot.d.ts +2 -2
- package/dist/cjs/toolbar/MRT_TablePagination.d.ts +1 -0
- package/dist/cjs/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -0
- package/dist/cjs/toolbar/MRT_TopToolbar.d.ts +1 -1
- package/dist/esm/MaterialReactTable.d.ts +19 -1
- package/dist/esm/body/MRT_EditRowModal.d.ts +1 -0
- package/dist/esm/buttons/MRT_ColumnPinningButtons.d.ts +1 -0
- package/dist/esm/buttons/MRT_EditActionButtons.d.ts +1 -0
- package/dist/esm/buttons/MRT_FullScreenToggleButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_GrabHandleButton.d.ts +1 -1
- package/dist/esm/buttons/MRT_ShowHideColumnsButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_ToggleDensePaddingButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_ToggleFiltersButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_ToggleGlobalFilterButton.d.ts +2 -1
- package/dist/esm/column.utils.d.ts +4 -3
- package/dist/esm/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
- package/dist/esm/inputs/MRT_EditCellTextField.d.ts +1 -0
- package/dist/esm/inputs/MRT_GlobalFilterTextField.d.ts +1 -0
- package/dist/esm/material-react-table.esm.js +107 -37
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/menus/MRT_FilterOptionMenu.d.ts +1 -0
- package/dist/esm/menus/MRT_ShowHideColumnsMenu.d.ts +1 -0
- package/dist/esm/table/MRT_TableRoot.d.ts +2 -2
- package/dist/esm/toolbar/MRT_TablePagination.d.ts +1 -0
- package/dist/esm/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -0
- package/dist/esm/toolbar/MRT_TopToolbar.d.ts +1 -1
- package/dist/index.d.ts +20 -1
- package/locales/cs.esm.js.map +1 -1
- package/locales/cs.js.map +1 -1
- package/package.json +10 -8
- package/src/MaterialReactTable.tsx +19 -21
- package/src/_locales/cs.ts +4 -2
- package/src/body/MRT_EditRowModal.tsx +6 -8
- package/src/body/MRT_TableBody.tsx +4 -3
- package/src/body/MRT_TableBodyCell.tsx +3 -1
- package/src/body/MRT_TableBodyRow.tsx +2 -1
- package/src/body/MRT_TableDetailPanel.tsx +3 -1
- package/src/buttons/MRT_ColumnPinningButtons.tsx +3 -1
- package/src/buttons/MRT_CopyButton.tsx +2 -1
- package/src/buttons/MRT_EditActionButtons.tsx +4 -1
- package/src/buttons/MRT_ExpandAllButton.tsx +2 -1
- package/src/buttons/MRT_ExpandButton.tsx +2 -1
- package/src/buttons/MRT_FullScreenToggleButton.tsx +3 -1
- package/src/buttons/MRT_GrabHandleButton.tsx +3 -1
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +3 -1
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +3 -1
- package/src/buttons/MRT_ToggleFiltersButton.tsx +3 -1
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +3 -1
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +2 -1
- package/src/column.utils.ts +8 -6
- package/src/footer/MRT_TableFooter.tsx +2 -1
- package/src/footer/MRT_TableFooterCell.tsx +1 -1
- package/src/footer/MRT_TableFooterRow.tsx +1 -1
- package/src/head/MRT_TableHead.tsx +1 -1
- package/src/head/MRT_TableHeadCell.tsx +4 -1
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -1
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +1 -1
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +4 -1
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +2 -1
- package/src/head/MRT_TableHeadCellSortLabel.tsx +4 -2
- package/src/head/MRT_TableHeadRow.tsx +2 -1
- package/src/icons.ts +60 -62
- package/src/inputs/MRT_EditCellTextField.tsx +2 -1
- package/src/inputs/MRT_FilterCheckbox.tsx +4 -6
- package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
- package/src/inputs/MRT_FilterTextField.tsx +11 -13
- package/src/inputs/MRT_GlobalFilterTextField.tsx +6 -8
- package/src/inputs/MRT_SelectCheckbox.tsx +4 -1
- package/src/menus/MRT_ColumnActionMenu.tsx +6 -2
- package/src/menus/MRT_FilterOptionMenu.tsx +3 -1
- package/src/menus/MRT_RowActionMenu.tsx +5 -2
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +5 -2
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +6 -8
- package/src/sortingFns.ts +2 -2
- package/src/table/MRT_Table.tsx +1 -1
- package/src/table/MRT_TableContainer.tsx +1 -1
- package/src/table/MRT_TablePaper.tsx +1 -1
- package/src/table/MRT_TableRoot.tsx +5 -4
- package/src/toolbar/MRT_BottomToolbar.tsx +4 -1
- package/src/toolbar/MRT_LinearProgressBar.tsx +2 -1
- package/src/toolbar/MRT_TablePagination.tsx +1 -1
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +5 -1
- package/src/toolbar/MRT_ToolbarDropZone.tsx +4 -1
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +1 -1
- package/src/toolbar/MRT_TopToolbar.tsx +5 -1
package/src/icons.ts
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
VisibilityOff,
|
|
32
|
-
} from '@mui/icons-material';
|
|
1
|
+
import ArrowRightIcon from '@mui/icons-material/ArrowRight';
|
|
2
|
+
import CancelIcon from '@mui/icons-material/Cancel';
|
|
3
|
+
import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
|
4
|
+
import ClearAllIcon from '@mui/icons-material/ClearAll';
|
|
5
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
6
|
+
import DensityLargeIcon from '@mui/icons-material/DensityLarge';
|
|
7
|
+
import DensityMediumIcon from '@mui/icons-material/DensityMedium';
|
|
8
|
+
import DensitySmallIcon from '@mui/icons-material/DensitySmall';
|
|
9
|
+
import DragHandleIcon from '@mui/icons-material/DragHandle';
|
|
10
|
+
import DynamicFeedIcon from '@mui/icons-material/DynamicFeed';
|
|
11
|
+
import EditIcon from '@mui/icons-material/Edit';
|
|
12
|
+
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
|
13
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
14
|
+
import FilterAltIcon from '@mui/icons-material/FilterAlt';
|
|
15
|
+
import FilterAltOffIcon from '@mui/icons-material/FilterAltOff';
|
|
16
|
+
import FilterListIcon from '@mui/icons-material/FilterList';
|
|
17
|
+
import FilterListOffIcon from '@mui/icons-material/FilterListOff';
|
|
18
|
+
import FullscreenExitIcon from '@mui/icons-material/FullscreenExit';
|
|
19
|
+
import FullscreenIcon from '@mui/icons-material/Fullscreen';
|
|
20
|
+
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
21
|
+
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
|
22
|
+
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
23
|
+
import PushPinIcon from '@mui/icons-material/PushPin';
|
|
24
|
+
import RestartAltIcon from '@mui/icons-material/RestartAlt';
|
|
25
|
+
import SaveIcon from '@mui/icons-material/Save';
|
|
26
|
+
import SearchIcon from '@mui/icons-material/Search';
|
|
27
|
+
import SearchOffIcon from '@mui/icons-material/SearchOff';
|
|
28
|
+
import SortIcon from '@mui/icons-material/Sort';
|
|
29
|
+
import ViewColumnIcon from '@mui/icons-material/ViewColumn';
|
|
30
|
+
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
|
33
31
|
|
|
34
32
|
export interface MRT_Icons {
|
|
35
33
|
ArrowRightIcon: any;
|
|
@@ -65,34 +63,34 @@ export interface MRT_Icons {
|
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export const MRT_Default_Icons: MRT_Icons = {
|
|
68
|
-
ArrowRightIcon
|
|
69
|
-
CancelIcon
|
|
70
|
-
CheckBoxIcon
|
|
71
|
-
ClearAllIcon
|
|
72
|
-
CloseIcon
|
|
73
|
-
DensityLargeIcon
|
|
74
|
-
DensityMediumIcon
|
|
75
|
-
DensitySmallIcon
|
|
76
|
-
DragHandleIcon
|
|
77
|
-
DynamicFeedIcon
|
|
78
|
-
EditIcon
|
|
79
|
-
ExpandLessIcon
|
|
80
|
-
ExpandMoreIcon
|
|
81
|
-
FilterAltIcon
|
|
82
|
-
FilterAltOffIcon
|
|
83
|
-
FilterListIcon
|
|
84
|
-
FilterListOffIcon
|
|
85
|
-
FullscreenExitIcon
|
|
86
|
-
FullscreenIcon
|
|
87
|
-
KeyboardDoubleArrowDownIcon
|
|
88
|
-
MoreHorizIcon
|
|
89
|
-
MoreVertIcon
|
|
90
|
-
PushPinIcon
|
|
91
|
-
RestartAltIcon
|
|
92
|
-
SaveIcon
|
|
93
|
-
SearchIcon
|
|
94
|
-
SearchOffIcon
|
|
95
|
-
SortIcon
|
|
96
|
-
ViewColumnIcon
|
|
97
|
-
VisibilityOffIcon
|
|
66
|
+
ArrowRightIcon,
|
|
67
|
+
CancelIcon,
|
|
68
|
+
CheckBoxIcon,
|
|
69
|
+
ClearAllIcon,
|
|
70
|
+
CloseIcon,
|
|
71
|
+
DensityLargeIcon,
|
|
72
|
+
DensityMediumIcon,
|
|
73
|
+
DensitySmallIcon,
|
|
74
|
+
DragHandleIcon,
|
|
75
|
+
DynamicFeedIcon,
|
|
76
|
+
EditIcon,
|
|
77
|
+
ExpandLessIcon,
|
|
78
|
+
ExpandMoreIcon,
|
|
79
|
+
FilterAltIcon,
|
|
80
|
+
FilterAltOffIcon,
|
|
81
|
+
FilterListIcon,
|
|
82
|
+
FilterListOffIcon,
|
|
83
|
+
FullscreenExitIcon,
|
|
84
|
+
FullscreenIcon,
|
|
85
|
+
KeyboardDoubleArrowDownIcon,
|
|
86
|
+
MoreHorizIcon,
|
|
87
|
+
MoreVertIcon,
|
|
88
|
+
PushPinIcon,
|
|
89
|
+
RestartAltIcon,
|
|
90
|
+
SaveIcon,
|
|
91
|
+
SearchIcon,
|
|
92
|
+
SearchOffIcon,
|
|
93
|
+
SortIcon,
|
|
94
|
+
ViewColumnIcon,
|
|
95
|
+
VisibilityOffIcon,
|
|
98
96
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ChangeEvent, FocusEvent, KeyboardEvent, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TextField from '@mui/material/TextField';
|
|
3
|
+
import type { TextFieldProps } from '@mui/material/TextField';
|
|
3
4
|
import type { MRT_Cell, MRT_TableInstance } from '..';
|
|
4
5
|
|
|
5
6
|
interface Props<TData extends Record<string, any> = {}> {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Tooltip,
|
|
7
|
-
} from '@mui/material';
|
|
2
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
3
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
5
|
+
import type { CheckboxProps } from '@mui/material/Checkbox';
|
|
8
6
|
import type { MRT_Column, MRT_TableInstance } from '..';
|
|
9
7
|
|
|
10
8
|
interface Props {
|
|
@@ -6,18 +6,16 @@ import React, {
|
|
|
6
6
|
useEffect,
|
|
7
7
|
useState,
|
|
8
8
|
} from 'react';
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Tooltip,
|
|
20
|
-
} from '@mui/material';
|
|
9
|
+
import Box from '@mui/material/Box';
|
|
10
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
11
|
+
import Chip from '@mui/material/Chip';
|
|
12
|
+
import IconButton from '@mui/material/IconButton';
|
|
13
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
14
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
15
|
+
import TextField from '@mui/material/TextField';
|
|
16
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
17
|
+
import debounce from '@mui/material/utils/debounce';
|
|
18
|
+
import type { TextFieldProps } from '@mui/material/TextField';
|
|
21
19
|
import type { MRT_Header, MRT_TableInstance } from '..';
|
|
22
20
|
import { MRT_FilterOptionMenu } from '../menus/MRT_FilterOptionMenu';
|
|
23
21
|
|
|
@@ -117,7 +115,7 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
117
115
|
const handleChangeDebounced = useCallback(
|
|
118
116
|
debounce(
|
|
119
117
|
(event: ChangeEvent<HTMLInputElement>) => {
|
|
120
|
-
|
|
118
|
+
const value =
|
|
121
119
|
textFieldProps.type === 'date'
|
|
122
120
|
? event.target.valueAsDate
|
|
123
121
|
: textFieldProps.type === 'number'
|
|
@@ -5,14 +5,12 @@ import React, {
|
|
|
5
5
|
useEffect,
|
|
6
6
|
useState,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Tooltip,
|
|
15
|
-
} from '@mui/material';
|
|
8
|
+
import Collapse from '@mui/material/Collapse';
|
|
9
|
+
import IconButton from '@mui/material/IconButton';
|
|
10
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
11
|
+
import TextField from '@mui/material/TextField';
|
|
12
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
13
|
+
import debounce from '@mui/material/utils/debounce';
|
|
16
14
|
import { MRT_FilterOptionMenu } from '../menus/MRT_FilterOptionMenu';
|
|
17
15
|
import { MRT_TableInstance } from '..';
|
|
18
16
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { FC, MouseEvent } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
3
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
4
|
+
import Radio from '@mui/material/Radio';
|
|
5
|
+
import type { Theme } from '@mui/material/styles';
|
|
3
6
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
4
7
|
|
|
5
8
|
interface Props {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React, { FC, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
5
|
+
import Menu from '@mui/material/Menu';
|
|
6
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
4
7
|
import { MRT_FilterOptionMenu } from './MRT_FilterOptionMenu';
|
|
5
8
|
import { MRT_ShowHideColumnsMenu } from './MRT_ShowHideColumnsMenu';
|
|
9
|
+
import type { MRT_Header, MRT_TableInstance } from '..';
|
|
6
10
|
|
|
7
11
|
export const commonMenuItemStyles = {
|
|
8
12
|
py: '6px',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Menu from '@mui/material/Menu';
|
|
4
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
3
5
|
import type {
|
|
4
6
|
MRT_FilterOption,
|
|
5
7
|
MRT_Header,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React, { FC, MouseEvent } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
4
|
+
import Menu from '@mui/material/Menu';
|
|
5
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
4
6
|
import {
|
|
5
7
|
commonListItemStyles,
|
|
6
8
|
commonMenuItemStyles,
|
|
7
9
|
} from './MRT_ColumnActionMenu';
|
|
10
|
+
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
8
11
|
|
|
9
12
|
interface Props {
|
|
10
13
|
anchorEl: HTMLElement | null;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Button from '@mui/material/Button';
|
|
4
|
+
import Divider from '@mui/material/Divider';
|
|
5
|
+
import Menu from '@mui/material/Menu';
|
|
3
6
|
import { MRT_ShowHideColumnsMenuItems } from './MRT_ShowHideColumnsMenuItems';
|
|
4
|
-
import type { MRT_Column, MRT_TableInstance } from '..';
|
|
5
7
|
import { getDefaultColumnOrderIds } from '../column.utils';
|
|
8
|
+
import type { MRT_Column, MRT_TableInstance } from '..';
|
|
6
9
|
|
|
7
10
|
interface Props<TData extends Record<string, any> = {}> {
|
|
8
11
|
anchorEl: HTMLElement | null;
|
|
@@ -5,14 +5,12 @@ import React, {
|
|
|
5
5
|
useRef,
|
|
6
6
|
useState,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Typography,
|
|
15
|
-
} from '@mui/material';
|
|
8
|
+
import Box from '@mui/material/Box';
|
|
9
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
10
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
11
|
+
import Switch from '@mui/material/Switch';
|
|
12
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
13
|
+
import Typography from '@mui/material/Typography';
|
|
16
14
|
import { MRT_ColumnPinningButtons } from '../buttons/MRT_ColumnPinningButtons';
|
|
17
15
|
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
|
18
16
|
import { reorderColumn } from '../column.utils';
|
package/src/sortingFns.ts
CHANGED
|
@@ -10,8 +10,8 @@ const fuzzy = <TData extends Record<string, any> = {}>(
|
|
|
10
10
|
let dir = 0;
|
|
11
11
|
if (rowA.columnFiltersMeta[columnId]) {
|
|
12
12
|
dir = compareItems(
|
|
13
|
-
rowA.columnFiltersMeta[columnId]
|
|
14
|
-
rowB.columnFiltersMeta[columnId]
|
|
13
|
+
rowA.columnFiltersMeta[columnId] as RankingInfo,
|
|
14
|
+
rowB.columnFiltersMeta[columnId] as RankingInfo,
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
// Provide a fallback for when the item ranks are equal
|
package/src/table/MRT_Table.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Table from '@mui/material/Table';
|
|
3
3
|
import { MRT_TableHead } from '../head/MRT_TableHead';
|
|
4
4
|
import { Memo_MRT_TableBody, MRT_TableBody } from '../body/MRT_TableBody';
|
|
5
5
|
import { MRT_TableFooter } from '../footer/MRT_TableFooter';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC, useEffect, useLayoutEffect, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TableContainer from '@mui/material/TableContainer';
|
|
3
3
|
import { MRT_Table } from './MRT_Table';
|
|
4
4
|
import type { MRT_TableInstance } from '..';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Paper from '@mui/material/Paper';
|
|
3
3
|
import { MRT_TopToolbar } from '../toolbar/MRT_TopToolbar';
|
|
4
4
|
import { MRT_BottomToolbar } from '../toolbar/MRT_BottomToolbar';
|
|
5
5
|
import { MRT_TableContainer } from './MRT_TableContainer';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
TableState,
|
|
4
3
|
getCoreRowModel,
|
|
5
4
|
getExpandedRowModel,
|
|
6
5
|
getFacetedRowModel,
|
|
@@ -9,14 +8,16 @@ import {
|
|
|
9
8
|
getPaginationRowModel,
|
|
10
9
|
getSortedRowModel,
|
|
11
10
|
useReactTable,
|
|
12
|
-
GroupingState,
|
|
13
11
|
} from '@tanstack/react-table';
|
|
14
|
-
import
|
|
12
|
+
import Box from '@mui/material/Box';
|
|
13
|
+
import Dialog from '@mui/material/Dialog';
|
|
14
|
+
import Grow from '@mui/material/Grow';
|
|
15
15
|
import { MRT_ExpandAllButton } from '../buttons/MRT_ExpandAllButton';
|
|
16
16
|
import { MRT_ExpandButton } from '../buttons/MRT_ExpandButton';
|
|
17
17
|
import { MRT_ToggleRowActionMenuButton } from '../buttons/MRT_ToggleRowActionMenuButton';
|
|
18
18
|
import { MRT_SelectCheckbox } from '../inputs/MRT_SelectCheckbox';
|
|
19
19
|
import { MRT_TablePaper } from './MRT_TablePaper';
|
|
20
|
+
import { MRT_EditRowModal } from '../body/MRT_EditRowModal';
|
|
20
21
|
import {
|
|
21
22
|
prepareColumns,
|
|
22
23
|
getAllLeafColumnDefs,
|
|
@@ -25,6 +26,7 @@ import {
|
|
|
25
26
|
showExpandColumn,
|
|
26
27
|
getColumnId,
|
|
27
28
|
} from '../column.utils';
|
|
29
|
+
import type { GroupingState, TableState } from '@tanstack/react-table';
|
|
28
30
|
import type {
|
|
29
31
|
MRT_Cell,
|
|
30
32
|
MRT_Column,
|
|
@@ -36,7 +38,6 @@ import type {
|
|
|
36
38
|
MaterialReactTableProps,
|
|
37
39
|
MRT_Localization,
|
|
38
40
|
} from '..';
|
|
39
|
-
import { MRT_EditRowModal } from '../body/MRT_EditRowModal';
|
|
40
41
|
|
|
41
42
|
export const MRT_TableRoot = <TData extends Record<string, any> = {}>(
|
|
42
43
|
props: MaterialReactTableProps<TData> & { localization: MRT_Localization },
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Toolbar from '@mui/material/Toolbar';
|
|
4
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
5
|
+
import { alpha } from '@mui/material/styles';
|
|
3
6
|
import { MRT_TablePagination } from './MRT_TablePagination';
|
|
4
7
|
import { MRT_ToolbarAlertBanner } from './MRT_ToolbarAlertBanner';
|
|
5
8
|
import { MRT_LinearProgressBar } from './MRT_LinearProgressBar';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Collapse from '@mui/material/Collapse';
|
|
3
|
+
import LinearProgress from '@mui/material/LinearProgress';
|
|
3
4
|
import { MRT_TableInstance } from '..';
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React, { FC, Fragment } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Alert from '@mui/material/Alert';
|
|
3
|
+
import AlertTitle from '@mui/material/AlertTitle';
|
|
4
|
+
import Box from '@mui/material/Box';
|
|
5
|
+
import Chip from '@mui/material/Chip';
|
|
6
|
+
import Collapse from '@mui/material/Collapse';
|
|
3
7
|
import { MRT_TableInstance } from '..';
|
|
4
8
|
|
|
5
9
|
interface Props {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { DragEvent, FC } from 'react';
|
|
2
|
-
import { alpha
|
|
2
|
+
import { alpha } from '@mui/material/styles';
|
|
3
|
+
import Box from '@mui/material/Box';
|
|
4
|
+
import Fade from '@mui/material/Fade';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
3
6
|
import { MRT_TableInstance } from '..';
|
|
4
7
|
|
|
5
8
|
interface Props {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
3
|
import { MRT_FullScreenToggleButton } from '../buttons/MRT_FullScreenToggleButton';
|
|
4
4
|
import { MRT_ShowHideColumnsButton } from '../buttons/MRT_ShowHideColumnsButton';
|
|
5
5
|
import { MRT_ToggleDensePaddingButton } from '../buttons/MRT_ToggleDensePaddingButton';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Toolbar from '@mui/material/Toolbar';
|
|
4
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
5
|
+
import { lighten } from '@mui/material/styles';
|
|
3
6
|
import { MRT_GlobalFilterTextField } from '../inputs/MRT_GlobalFilterTextField';
|
|
4
7
|
import { MRT_LinearProgressBar } from './MRT_LinearProgressBar';
|
|
5
8
|
import { MRT_TableInstance } from '..';
|
|
@@ -7,6 +10,7 @@ import { MRT_TablePagination } from './MRT_TablePagination';
|
|
|
7
10
|
import { MRT_ToolbarAlertBanner } from './MRT_ToolbarAlertBanner';
|
|
8
11
|
import { MRT_ToolbarInternalButtons } from './MRT_ToolbarInternalButtons';
|
|
9
12
|
import { MRT_ToolbarDropZone } from './MRT_ToolbarDropZone';
|
|
13
|
+
import type { Theme } from '@mui/material/styles';
|
|
10
14
|
|
|
11
15
|
export const commonToolbarStyles = ({ theme }: { theme: Theme }) => ({
|
|
12
16
|
alignItems: 'flex-start',
|