material-react-table 0.16.2 → 0.18.0
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/README.md +1 -1
- package/dist/MaterialReactTable.d.ts +9 -103
- package/dist/material-react-table.cjs.development.js +55 -219
- 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 +55 -219
- package/dist/material-react-table.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/MaterialReactTable.tsx +6 -182
- package/src/body/MRT_TableBodyCell.tsx +1 -9
- package/src/body/MRT_TableBodyRow.tsx +2 -5
- package/src/body/MRT_TableDetailPanel.tsx +1 -5
- package/src/buttons/MRT_ExpandButton.tsx +2 -4
- package/src/buttons/MRT_FullScreenToggleButton.tsx +2 -8
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +2 -8
- package/src/buttons/MRT_ToggleFiltersButton.tsx +2 -8
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +2 -8
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +3 -2
- package/src/inputs/MRT_EditCellTextField.tsx +3 -3
- package/src/inputs/MRT_FilterTextField.tsx +31 -61
- package/src/inputs/MRT_GlobalFilterTextField.tsx +0 -4
- package/src/inputs/MRT_SelectCheckbox.tsx +0 -24
- package/src/menus/MRT_ColumnActionMenu.tsx +28 -11
- package/src/table/MRT_TableRoot.tsx +5 -74
- package/src/toolbar/MRT_TablePagination.tsx +9 -4
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +2 -2
|
@@ -37,8 +37,6 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
37
37
|
icons: { FilterListIcon, CloseIcon },
|
|
38
38
|
localization,
|
|
39
39
|
muiTableHeadCellFilterTextFieldProps,
|
|
40
|
-
onColumnFilterValueChanged,
|
|
41
|
-
onColumnFilterValueChangedDebounced,
|
|
42
40
|
tableId,
|
|
43
41
|
},
|
|
44
42
|
setCurrentFilterFns,
|
|
@@ -87,18 +85,6 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
87
85
|
} else {
|
|
88
86
|
column.setFilterValue(event.target.value ?? undefined);
|
|
89
87
|
}
|
|
90
|
-
onColumnFilterValueChangedDebounced?.({
|
|
91
|
-
column,
|
|
92
|
-
event,
|
|
93
|
-
filterValue: event.target.value,
|
|
94
|
-
instance,
|
|
95
|
-
});
|
|
96
|
-
columnDef.onColumnFilterValueChangedDebounced?.({
|
|
97
|
-
column,
|
|
98
|
-
event,
|
|
99
|
-
filterValue: event.target.value,
|
|
100
|
-
instance,
|
|
101
|
-
});
|
|
102
88
|
}, 200),
|
|
103
89
|
[],
|
|
104
90
|
);
|
|
@@ -106,18 +92,6 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
106
92
|
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
107
93
|
setFilterValue(event.target.value);
|
|
108
94
|
handleChangeDebounced(event);
|
|
109
|
-
onColumnFilterValueChanged?.({
|
|
110
|
-
column,
|
|
111
|
-
event,
|
|
112
|
-
filterValue: event.target.value,
|
|
113
|
-
instance,
|
|
114
|
-
});
|
|
115
|
-
columnDef.onColumnFilterValueChanged?.({
|
|
116
|
-
column,
|
|
117
|
-
event,
|
|
118
|
-
filterValue: event.target.value,
|
|
119
|
-
instance,
|
|
120
|
-
});
|
|
121
95
|
};
|
|
122
96
|
|
|
123
97
|
const handleFilterMenuOpen = (event: MouseEvent<HTMLElement>) => {
|
|
@@ -177,9 +151,13 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
177
151
|
const allowedColumnFilterOptions =
|
|
178
152
|
columnDef?.enabledColumnFilterOptions ?? enabledColumnFilterOptions;
|
|
179
153
|
|
|
180
|
-
const
|
|
154
|
+
const showChangeModeButton =
|
|
181
155
|
enableColumnFilterChangeMode &&
|
|
182
|
-
columnDef.enableColumnFilterChangeMode !== false
|
|
156
|
+
columnDef.enableColumnFilterChangeMode !== false &&
|
|
157
|
+
!isSelectFilter &&
|
|
158
|
+
!inputIndex &&
|
|
159
|
+
(allowedColumnFilterOptions === undefined ||
|
|
160
|
+
!!allowedColumnFilterOptions?.length);
|
|
183
161
|
|
|
184
162
|
return (
|
|
185
163
|
<>
|
|
@@ -195,10 +173,7 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
195
173
|
title: filterPlaceholder,
|
|
196
174
|
}}
|
|
197
175
|
helperText={
|
|
198
|
-
|
|
199
|
-
!inputIndex &&
|
|
200
|
-
(allowedColumnFilterOptions === undefined ||
|
|
201
|
-
(allowedColumnFilterOptions?.length ?? 0) > 0) ? (
|
|
176
|
+
showChangeModeButton ? (
|
|
202
177
|
<label htmlFor={filterId}>
|
|
203
178
|
{filterFn instanceof Function
|
|
204
179
|
? localization.filterMode.replace(
|
|
@@ -240,35 +215,30 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
|
240
215
|
value={filterValue ?? ''}
|
|
241
216
|
variant="standard"
|
|
242
217
|
InputProps={{
|
|
243
|
-
startAdornment:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
)}
|
|
268
|
-
</InputAdornment>
|
|
269
|
-
) : (
|
|
270
|
-
<FilterListIcon />
|
|
271
|
-
),
|
|
218
|
+
startAdornment: showChangeModeButton ? (
|
|
219
|
+
<InputAdornment position="start">
|
|
220
|
+
<Tooltip arrow title={localization.changeFilterMode}>
|
|
221
|
+
<span>
|
|
222
|
+
<IconButton
|
|
223
|
+
aria-label={localization.changeFilterMode}
|
|
224
|
+
onClick={handleFilterMenuOpen}
|
|
225
|
+
size="small"
|
|
226
|
+
sx={{ height: '1.75rem', width: '1.75rem' }}
|
|
227
|
+
>
|
|
228
|
+
<FilterListIcon />
|
|
229
|
+
</IconButton>
|
|
230
|
+
</span>
|
|
231
|
+
</Tooltip>
|
|
232
|
+
{filterChipLabel && (
|
|
233
|
+
<Chip
|
|
234
|
+
onDelete={handleClearFilterChip}
|
|
235
|
+
label={filterChipLabel}
|
|
236
|
+
/>
|
|
237
|
+
)}
|
|
238
|
+
</InputAdornment>
|
|
239
|
+
) : (
|
|
240
|
+
<FilterListIcon />
|
|
241
|
+
),
|
|
272
242
|
endAdornment: !filterChipLabel && (
|
|
273
243
|
<InputAdornment position="end">
|
|
274
244
|
<Tooltip
|
|
@@ -29,8 +29,6 @@ export const MRT_GlobalFilterTextField: FC<Props> = ({ instance }) => {
|
|
|
29
29
|
icons: { SearchIcon, CloseIcon },
|
|
30
30
|
localization,
|
|
31
31
|
muiSearchTextFieldProps,
|
|
32
|
-
onGlobalFilterValueChanged,
|
|
33
|
-
onGlobalFilterValueChangedDebounced,
|
|
34
32
|
tableId,
|
|
35
33
|
},
|
|
36
34
|
} = instance;
|
|
@@ -43,7 +41,6 @@ export const MRT_GlobalFilterTextField: FC<Props> = ({ instance }) => {
|
|
|
43
41
|
const handleChangeDebounced = useCallback(
|
|
44
42
|
debounce((event: ChangeEvent<HTMLInputElement>) => {
|
|
45
43
|
setGlobalFilter(event.target.value ?? undefined);
|
|
46
|
-
onGlobalFilterValueChangedDebounced?.({ event, instance });
|
|
47
44
|
}, 250),
|
|
48
45
|
[],
|
|
49
46
|
);
|
|
@@ -51,7 +48,6 @@ export const MRT_GlobalFilterTextField: FC<Props> = ({ instance }) => {
|
|
|
51
48
|
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
52
49
|
setSearchValue(event.target.value);
|
|
53
50
|
handleChangeDebounced(event);
|
|
54
|
-
onGlobalFilterValueChanged?.({ event, instance });
|
|
55
51
|
};
|
|
56
52
|
|
|
57
53
|
const handleGlobalFilterMenuOpen = (event: MouseEvent<HTMLElement>) => {
|
|
@@ -10,16 +10,11 @@ interface Props {
|
|
|
10
10
|
|
|
11
11
|
export const MRT_SelectCheckbox: FC<Props> = ({ row, selectAll, instance }) => {
|
|
12
12
|
const {
|
|
13
|
-
getRowModel,
|
|
14
|
-
getPaginationRowModel,
|
|
15
|
-
getSelectedRowModel,
|
|
16
13
|
getState,
|
|
17
14
|
options: {
|
|
18
15
|
localization,
|
|
19
16
|
muiSelectCheckboxProps,
|
|
20
17
|
muiSelectAllCheckboxProps,
|
|
21
|
-
onRowSelectionChanged,
|
|
22
|
-
onRowSelectAllChanged,
|
|
23
18
|
selectAllMode,
|
|
24
19
|
},
|
|
25
20
|
} = instance;
|
|
@@ -33,27 +28,8 @@ export const MRT_SelectCheckbox: FC<Props> = ({ row, selectAll, instance }) => {
|
|
|
33
28
|
} else if (selectAllMode === 'page') {
|
|
34
29
|
instance.getToggleAllPageRowsSelectedHandler()(event as any);
|
|
35
30
|
}
|
|
36
|
-
onRowSelectAllChanged?.({
|
|
37
|
-
event,
|
|
38
|
-
selectedRows: event.target.checked
|
|
39
|
-
? selectAllMode === 'all'
|
|
40
|
-
? getRowModel().flatRows
|
|
41
|
-
: getPaginationRowModel().flatRows
|
|
42
|
-
: [],
|
|
43
|
-
instance,
|
|
44
|
-
});
|
|
45
31
|
} else if (row) {
|
|
46
32
|
row?.getToggleSelectedHandler()(event as any);
|
|
47
|
-
onRowSelectionChanged?.({
|
|
48
|
-
event,
|
|
49
|
-
row,
|
|
50
|
-
selectedRows: event.target.checked
|
|
51
|
-
? [...getSelectedRowModel().flatRows, row]
|
|
52
|
-
: getSelectedRowModel().flatRows.filter(
|
|
53
|
-
(selectedRow) => selectedRow.id !== row.id,
|
|
54
|
-
),
|
|
55
|
-
instance,
|
|
56
|
-
});
|
|
57
33
|
}
|
|
58
34
|
};
|
|
59
35
|
|
|
@@ -34,12 +34,14 @@ export const MRT_ColumnActionMenu: FC<Props> = ({
|
|
|
34
34
|
toggleAllColumnsVisible,
|
|
35
35
|
setColumnOrder,
|
|
36
36
|
options: {
|
|
37
|
+
enableColumnFilterChangeMode,
|
|
37
38
|
enableColumnFilters,
|
|
38
39
|
enableColumnResizing,
|
|
39
40
|
enableGrouping,
|
|
40
41
|
enableHiding,
|
|
41
42
|
enablePinning,
|
|
42
43
|
enableSorting,
|
|
44
|
+
enabledColumnFilterOptions,
|
|
43
45
|
icons: {
|
|
44
46
|
ArrowRightIcon,
|
|
45
47
|
ClearAllIcon,
|
|
@@ -144,6 +146,18 @@ export const MRT_ColumnActionMenu: FC<Props> = ({
|
|
|
144
146
|
setShowHideColumnsMenuAnchorEl(event.currentTarget);
|
|
145
147
|
};
|
|
146
148
|
|
|
149
|
+
const isSelectFilter = !!columnDef.filterSelectOptions;
|
|
150
|
+
|
|
151
|
+
const allowedColumnFilterOptions =
|
|
152
|
+
columnDef?.enabledColumnFilterOptions ?? enabledColumnFilterOptions;
|
|
153
|
+
|
|
154
|
+
const showFilterModeSubMenu =
|
|
155
|
+
enableColumnFilterChangeMode &&
|
|
156
|
+
columnDef.enableColumnFilterChangeMode !== false &&
|
|
157
|
+
!isSelectFilter &&
|
|
158
|
+
(allowedColumnFilterOptions === undefined ||
|
|
159
|
+
!!allowedColumnFilterOptions?.length);
|
|
160
|
+
|
|
147
161
|
return (
|
|
148
162
|
<Menu
|
|
149
163
|
anchorEl={anchorEl}
|
|
@@ -203,7 +217,8 @@ export const MRT_ColumnActionMenu: FC<Props> = ({
|
|
|
203
217
|
</MenuItem>,
|
|
204
218
|
]}
|
|
205
219
|
{enableColumnFilters &&
|
|
206
|
-
column.getCanFilter() &&
|
|
220
|
+
column.getCanFilter() &&
|
|
221
|
+
[
|
|
207
222
|
<MenuItem
|
|
208
223
|
disabled={!column.getFilterValue()}
|
|
209
224
|
key={0}
|
|
@@ -232,7 +247,7 @@ export const MRT_ColumnActionMenu: FC<Props> = ({
|
|
|
232
247
|
String(columnDef.header),
|
|
233
248
|
)}
|
|
234
249
|
</Box>
|
|
235
|
-
{
|
|
250
|
+
{showFilterModeSubMenu && (
|
|
236
251
|
<IconButton
|
|
237
252
|
onClick={handleOpenFilterModeMenu}
|
|
238
253
|
onMouseEnter={handleOpenFilterModeMenu}
|
|
@@ -243,15 +258,17 @@ export const MRT_ColumnActionMenu: FC<Props> = ({
|
|
|
243
258
|
</IconButton>
|
|
244
259
|
)}
|
|
245
260
|
</MenuItem>,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
261
|
+
showFilterModeSubMenu && (
|
|
262
|
+
<MRT_FilterOptionMenu
|
|
263
|
+
anchorEl={filterMenuAnchorEl}
|
|
264
|
+
header={header}
|
|
265
|
+
key={2}
|
|
266
|
+
onSelect={handleFilterByColumn}
|
|
267
|
+
setAnchorEl={setFilterMenuAnchorEl}
|
|
268
|
+
instance={instance}
|
|
269
|
+
/>
|
|
270
|
+
),
|
|
271
|
+
].filter(Boolean)}
|
|
255
272
|
{enableGrouping &&
|
|
256
273
|
column.getCanGroup() && [
|
|
257
274
|
<MenuItem
|
|
@@ -56,30 +56,6 @@ export const MRT_TableRoot = <D extends Record<string, any> = {}>(
|
|
|
56
56
|
const initState = props.initialState ?? {};
|
|
57
57
|
initState.columnOrder =
|
|
58
58
|
initState.columnOrder ?? getDefaultColumnOrderIds(props);
|
|
59
|
-
|
|
60
|
-
if (!props.enablePersistentState || !props.tableId) {
|
|
61
|
-
return initState;
|
|
62
|
-
}
|
|
63
|
-
if (typeof window === 'undefined') {
|
|
64
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
65
|
-
console.error(
|
|
66
|
-
'The MRT Persistent Table State feature is not supported if using SSR, but you can wrap your <MaterialReactTable /> in a MUI <NoSsr> tags to let it work',
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
return initState;
|
|
70
|
-
}
|
|
71
|
-
const storedState =
|
|
72
|
-
props.persistentStateMode === 'localStorage'
|
|
73
|
-
? localStorage.getItem(`mrt-${tableId}-table-state`)
|
|
74
|
-
: props.persistentStateMode === 'sessionStorage'
|
|
75
|
-
? sessionStorage.getItem(`mrt-${tableId}-table-state`)
|
|
76
|
-
: '{}';
|
|
77
|
-
if (storedState) {
|
|
78
|
-
const parsedState = JSON.parse(storedState);
|
|
79
|
-
if (parsedState) {
|
|
80
|
-
return { ...initState, ...parsedState };
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
59
|
return initState;
|
|
84
60
|
}, []);
|
|
85
61
|
|
|
@@ -97,6 +73,9 @@ export const MRT_TableRoot = <D extends Record<string, any> = {}>(
|
|
|
97
73
|
const [isFullScreen, setIsFullScreen] = useState(
|
|
98
74
|
initialState?.isFullScreen ?? false,
|
|
99
75
|
);
|
|
76
|
+
const [showAlertBanner, setShowAlertBanner] = useState(
|
|
77
|
+
props.initialState?.showAlertBanner ?? false,
|
|
78
|
+
);
|
|
100
79
|
const [showFilters, setShowFilters] = useState(
|
|
101
80
|
initialState?.showFilters ?? false,
|
|
102
81
|
);
|
|
@@ -265,6 +244,7 @@ export const MRT_TableRoot = <D extends Record<string, any> = {}>(
|
|
|
265
244
|
currentGlobalFilterFn,
|
|
266
245
|
density,
|
|
267
246
|
isFullScreen,
|
|
247
|
+
showAlertBanner,
|
|
268
248
|
showFilters,
|
|
269
249
|
showGlobalFilter,
|
|
270
250
|
...props.state,
|
|
@@ -280,60 +260,11 @@ export const MRT_TableRoot = <D extends Record<string, any> = {}>(
|
|
|
280
260
|
props.onCurrentGlobalFilterFnChange ?? setCurrentGlobalFilterFn,
|
|
281
261
|
setDensity: props.onDensityChange ?? setDensity,
|
|
282
262
|
setIsFullScreen: props.onIsFullScreenChange ?? setIsFullScreen,
|
|
263
|
+
setShowAlertBanner: props.onShowAlertBannerChange ?? setShowAlertBanner,
|
|
283
264
|
setShowFilters: props.onShowFiltersChange ?? setShowFilters,
|
|
284
265
|
setShowGlobalFilter: props.onShowGlobalFilterChange ?? setShowGlobalFilter,
|
|
285
266
|
} as MRT_TableInstance;
|
|
286
267
|
|
|
287
|
-
useEffect(() => {
|
|
288
|
-
if (typeof window === 'undefined' || !props.enablePersistentState) {
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
if (!props.tableId && process.env.NODE_ENV !== 'production') {
|
|
292
|
-
console.warn(
|
|
293
|
-
'a unique tableId prop is required for persistent table state to work',
|
|
294
|
-
);
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
const itemArgs: [string, string] = [
|
|
298
|
-
`mrt-${tableId}-table-state`,
|
|
299
|
-
JSON.stringify(instance.getState()),
|
|
300
|
-
];
|
|
301
|
-
if (props.persistentStateMode === 'localStorage') {
|
|
302
|
-
localStorage.setItem(...itemArgs);
|
|
303
|
-
} else if (props.persistentStateMode === 'sessionStorage') {
|
|
304
|
-
sessionStorage.setItem(...itemArgs);
|
|
305
|
-
}
|
|
306
|
-
}, [
|
|
307
|
-
props.enablePersistentState,
|
|
308
|
-
props.tableId,
|
|
309
|
-
props.persistentStateMode,
|
|
310
|
-
instance,
|
|
311
|
-
]);
|
|
312
|
-
|
|
313
|
-
useEffect(() => {
|
|
314
|
-
props?.onColumnOrderChanged?.({
|
|
315
|
-
columnOrder: instance.getState().columnOrder,
|
|
316
|
-
//@ts-ignore
|
|
317
|
-
instance,
|
|
318
|
-
});
|
|
319
|
-
}, [instance.getState().columnOrder]);
|
|
320
|
-
|
|
321
|
-
useEffect(() => {
|
|
322
|
-
props?.onColumnPinningChanged?.({
|
|
323
|
-
columnPinning: instance.getState().columnPinning,
|
|
324
|
-
//@ts-ignore
|
|
325
|
-
instance,
|
|
326
|
-
});
|
|
327
|
-
}, [instance.getState().columnPinning]);
|
|
328
|
-
|
|
329
|
-
useEffect(() => {
|
|
330
|
-
props?.onColumnVisibilityChanged?.({
|
|
331
|
-
columnPinning: instance.getState().columnVisibility,
|
|
332
|
-
//@ts-ignore
|
|
333
|
-
instance,
|
|
334
|
-
});
|
|
335
|
-
}, [instance.getState().columnVisibility]);
|
|
336
|
-
|
|
337
268
|
return (
|
|
338
269
|
<>
|
|
339
270
|
<Dialog
|
|
@@ -13,7 +13,11 @@ export const MRT_TablePagination: FC<Props> = ({ instance, position }) => {
|
|
|
13
13
|
getState,
|
|
14
14
|
setPageIndex,
|
|
15
15
|
setPageSize,
|
|
16
|
-
options: {
|
|
16
|
+
options: {
|
|
17
|
+
muiTablePaginationProps,
|
|
18
|
+
enableToolbarInternalActions,
|
|
19
|
+
rowCount,
|
|
20
|
+
},
|
|
17
21
|
} = instance;
|
|
18
22
|
|
|
19
23
|
const {
|
|
@@ -30,8 +34,9 @@ export const MRT_TablePagination: FC<Props> = ({ instance, position }) => {
|
|
|
30
34
|
setPageSize(+event.target.value);
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
const
|
|
34
|
-
|
|
37
|
+
const totalRowCount = rowCount ?? getPrePaginationRowModel().rows.length;
|
|
38
|
+
|
|
39
|
+
const showFirstLastPageButtons = totalRowCount / pageSize > 2;
|
|
35
40
|
|
|
36
41
|
return (
|
|
37
42
|
<TablePagination
|
|
@@ -40,7 +45,7 @@ export const MRT_TablePagination: FC<Props> = ({ instance, position }) => {
|
|
|
40
45
|
MenuProps: { MenuListProps: { disablePadding: true } },
|
|
41
46
|
}}
|
|
42
47
|
component="div"
|
|
43
|
-
count={
|
|
48
|
+
count={totalRowCount}
|
|
44
49
|
onPageChange={(_: any, newPage: number) => setPageIndex(newPage)}
|
|
45
50
|
onRowsPerPageChange={handleChangeRowsPerPage}
|
|
46
51
|
page={pageIndex}
|
|
@@ -18,7 +18,7 @@ export const MRT_ToolbarAlertBanner: FC<Props> = ({
|
|
|
18
18
|
options: { localization, muiTableToolbarAlertBannerProps },
|
|
19
19
|
} = instance;
|
|
20
20
|
|
|
21
|
-
const { grouping } = getState();
|
|
21
|
+
const { grouping, showAlertBanner } = getState();
|
|
22
22
|
|
|
23
23
|
const alertProps =
|
|
24
24
|
muiTableToolbarAlertBannerProps instanceof Function
|
|
@@ -57,7 +57,7 @@ export const MRT_ToolbarAlertBanner: FC<Props> = ({
|
|
|
57
57
|
|
|
58
58
|
return (
|
|
59
59
|
<Collapse
|
|
60
|
-
in={!!selectMessage || !!groupedByMessage}
|
|
60
|
+
in={showAlertBanner || !!selectMessage || !!groupedByMessage}
|
|
61
61
|
timeout={stackAlertBanner ? 200 : 0}
|
|
62
62
|
>
|
|
63
63
|
<Alert
|