material-react-table 2.0.0-beta.9 → 2.0.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +36 -27
- package/dist/index.d.ts +54 -5
- package/dist/{esm/material-react-table.esm.js → index.esm.js} +57 -61
- package/dist/index.esm.js.map +1 -0
- package/dist/{cjs/index.js → index.js} +299 -209
- package/dist/index.js.map +1 -0
- package/dist/types/MaterialReactTable.d.ts +7 -0
- package/dist/types/aggregationFns.d.ts +11 -0
- package/dist/types/body/MRT_TableBody.d.ts +13 -0
- package/dist/types/body/MRT_TableBodyCell.d.ts +15 -0
- package/dist/types/body/MRT_TableBodyCellValue.d.ts +8 -0
- package/dist/types/body/MRT_TableBodyRow.d.ts +18 -0
- package/dist/types/body/MRT_TableBodyRowGrabHandle.d.ts +10 -0
- package/dist/types/body/MRT_TableBodyRowPinButton.d.ts +8 -0
- package/dist/types/body/MRT_TableDetailPanel.d.ts +13 -0
- package/dist/types/body/index.d.ts +7 -0
- package/dist/types/buttons/MRT_ColumnPinningButtons.d.ts +8 -0
- package/dist/types/buttons/MRT_CopyButton.d.ts +8 -0
- package/dist/types/buttons/MRT_EditActionButtons.d.ts +9 -0
- package/dist/types/buttons/MRT_ExpandAllButton.d.ts +7 -0
- package/dist/types/buttons/MRT_ExpandButton.d.ts +8 -0
- package/dist/types/buttons/MRT_GrabHandleButton.d.ts +12 -0
- package/dist/types/buttons/MRT_RowPinButton.d.ts +10 -0
- package/dist/types/buttons/MRT_ShowHideColumnsButton.d.ts +7 -0
- package/dist/types/buttons/MRT_ToggleDensePaddingButton.d.ts +7 -0
- package/dist/types/buttons/MRT_ToggleFiltersButton.d.ts +7 -0
- package/dist/types/buttons/MRT_ToggleFullScreenButton.d.ts +7 -0
- package/dist/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +7 -0
- package/dist/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +9 -0
- package/dist/types/buttons/index.d.ts +13 -0
- package/dist/types/column.utils.d.ts +127 -0
- package/dist/types/filterFns.d.ts +69 -0
- package/dist/types/footer/MRT_TableFooter.d.ts +11 -0
- package/dist/types/footer/MRT_TableFooterCell.d.ts +8 -0
- package/dist/types/footer/MRT_TableFooterRow.d.ts +12 -0
- package/dist/types/footer/index.d.ts +3 -0
- package/dist/types/head/MRT_TableHead.d.ts +11 -0
- package/dist/types/head/MRT_TableHeadCell.d.ts +8 -0
- package/dist/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +8 -0
- package/dist/types/head/MRT_TableHeadCellFilterContainer.d.ts +8 -0
- package/dist/types/head/MRT_TableHeadCellFilterLabel.d.ts +8 -0
- package/dist/types/head/MRT_TableHeadCellGrabHandle.d.ts +10 -0
- package/dist/types/head/MRT_TableHeadCellResizeHandle.d.ts +8 -0
- package/dist/types/head/MRT_TableHeadCellSortLabel.d.ts +8 -0
- package/dist/types/head/MRT_TableHeadRow.d.ts +12 -0
- package/dist/types/head/index.d.ts +9 -0
- package/dist/types/hooks/index.d.ts +4 -0
- package/dist/types/hooks/useMRT_DisplayColumns.d.ts +9 -0
- package/dist/types/hooks/useMRT_Effects.d.ts +2 -0
- package/dist/types/hooks/useMRT_TableInstance.d.ts +2 -0
- package/dist/types/hooks/useMRT_TableOptions.d.ts +22 -0
- package/dist/types/icons.d.ts +36 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/inputs/MRT_EditCellTextField.d.ts +8 -0
- package/dist/types/inputs/MRT_FilterCheckbox.d.ts +8 -0
- package/dist/types/inputs/MRT_FilterRangeFields.d.ts +8 -0
- package/dist/types/inputs/MRT_FilterRangeSlider.d.ts +8 -0
- package/dist/types/inputs/MRT_FilterTextField.d.ts +9 -0
- package/dist/types/inputs/MRT_GlobalFilterTextField.d.ts +7 -0
- package/dist/types/inputs/MRT_SelectCheckbox.d.ts +9 -0
- package/dist/types/inputs/index.d.ts +7 -0
- package/{locales → dist/types/locales}/ar.d.ts +0 -1
- package/{locales → dist/types/locales}/az.d.ts +0 -1
- package/{locales → dist/types/locales}/bg.d.ts +0 -1
- package/{locales → dist/types/locales}/cs.d.ts +0 -1
- package/{locales → dist/types/locales}/da.d.ts +0 -1
- package/{locales → dist/types/locales}/de.d.ts +0 -1
- package/{locales → dist/types/locales}/en.d.ts +0 -1
- package/{locales → dist/types/locales}/es.d.ts +0 -1
- package/{locales → dist/types/locales}/et.d.ts +0 -1
- package/{locales → dist/types/locales}/fa.d.ts +0 -1
- package/{locales → dist/types/locales}/fi.d.ts +0 -1
- package/{locales → dist/types/locales}/fr.d.ts +0 -1
- package/{locales → dist/types/locales}/hu.d.ts +0 -1
- package/{locales → dist/types/locales}/hy.d.ts +0 -1
- package/{locales → dist/types/locales}/id.d.ts +0 -1
- package/{locales → dist/types/locales}/it.d.ts +0 -1
- package/{locales → dist/types/locales}/ja.d.ts +0 -1
- package/{locales → dist/types/locales}/ko.d.ts +0 -1
- package/{locales → dist/types/locales}/nl.d.ts +0 -1
- package/{locales → dist/types/locales}/no.d.ts +0 -1
- package/{locales → dist/types/locales}/np.d.ts +0 -1
- package/{locales → dist/types/locales}/pl.d.ts +0 -1
- package/{locales → dist/types/locales}/pt-BR.d.ts +0 -1
- package/{locales → dist/types/locales}/pt.d.ts +0 -1
- package/{locales → dist/types/locales}/ro.d.ts +0 -1
- package/{locales → dist/types/locales}/ru.d.ts +0 -1
- package/{locales → dist/types/locales}/sk.d.ts +0 -1
- package/{locales → dist/types/locales}/sr-Cyrl-RS.d.ts +0 -1
- package/{locales → dist/types/locales}/sr-Latn-RS.d.ts +0 -1
- package/{locales → dist/types/locales}/sv.d.ts +0 -1
- package/{locales → dist/types/locales}/tr.d.ts +0 -1
- package/{locales → dist/types/locales}/uk.d.ts +0 -1
- package/{locales → dist/types/locales}/vi.d.ts +0 -1
- package/{locales → dist/types/locales}/zh-Hans.d.ts +0 -1
- package/{locales → dist/types/locales}/zh-Hant.d.ts +0 -1
- package/dist/types/menus/MRT_ColumnActionMenu.d.ts +20 -0
- package/dist/types/menus/MRT_FilterOptionMenu.d.ts +13 -0
- package/dist/types/menus/MRT_RowActionMenu.d.ts +12 -0
- package/dist/types/menus/MRT_ShowHideColumnsMenu.d.ts +10 -0
- package/dist/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +12 -0
- package/dist/types/menus/index.d.ts +5 -0
- package/dist/types/modals/MRT_EditRowModal.d.ts +8 -0
- package/dist/types/modals/index.d.ts +1 -0
- package/dist/types/sortingFns.d.ts +12 -0
- package/dist/types/style.utils.d.ts +32 -0
- package/dist/types/table/MRT_Table.d.ts +7 -0
- package/dist/types/table/MRT_TableContainer.d.ts +7 -0
- package/dist/types/table/MRT_TableLoadingOverlay.d.ts +7 -0
- package/dist/types/table/MRT_TablePaper.d.ts +7 -0
- package/dist/types/table/index.d.ts +5 -0
- package/dist/types/toolbar/MRT_BottomToolbar.d.ts +7 -0
- package/dist/types/toolbar/MRT_LinearProgressBar.d.ts +8 -0
- package/dist/types/toolbar/MRT_TablePagination.d.ts +11 -0
- package/dist/types/toolbar/MRT_ToolbarAlertBanner.d.ts +8 -0
- package/dist/types/toolbar/MRT_ToolbarDropZone.d.ts +7 -0
- package/dist/types/toolbar/MRT_ToolbarInternalButtons.d.ts +7 -0
- package/dist/types/toolbar/MRT_TopToolbar.d.ts +6 -0
- package/dist/types/toolbar/index.d.ts +7 -0
- package/dist/types/types.d.ts +844 -0
- package/dist/types/useMaterialReactTable.d.ts +2 -0
- package/locales/ar/index.d.ts +3 -0
- package/locales/ar/index.esm.d.ts +3 -0
- package/locales/{ar.js → ar/index.js} +2 -0
- package/locales/ar/package.json +6 -0
- package/locales/az/index.d.ts +3 -0
- package/locales/az/index.esm.d.ts +3 -0
- package/locales/{az.js → az/index.js} +2 -0
- package/locales/az/package.json +6 -0
- package/locales/bg/index.d.ts +3 -0
- package/locales/bg/index.esm.d.ts +3 -0
- package/locales/{bg.js → bg/index.js} +2 -0
- package/locales/bg/package.json +6 -0
- package/locales/cs/index.d.ts +3 -0
- package/locales/cs/index.esm.d.ts +3 -0
- package/locales/{cs.js → cs/index.js} +2 -0
- package/locales/cs/package.json +6 -0
- package/locales/da/index.d.ts +3 -0
- package/locales/da/index.esm.d.ts +3 -0
- package/locales/{da.js → da/index.js} +2 -0
- package/locales/da/package.json +6 -0
- package/locales/de/index.d.ts +3 -0
- package/locales/de/index.esm.d.ts +3 -0
- package/locales/{de.js → de/index.js} +2 -0
- package/locales/de/package.json +6 -0
- package/locales/en/index.d.ts +3 -0
- package/locales/en/index.esm.d.ts +3 -0
- package/locales/{en.js → en/index.js} +2 -0
- package/locales/en/package.json +6 -0
- package/locales/es/index.d.ts +3 -0
- package/locales/es/index.esm.d.ts +3 -0
- package/locales/{es.js → es/index.js} +2 -0
- package/locales/es/package.json +6 -0
- package/locales/et/index.d.ts +3 -0
- package/locales/et/index.esm.d.ts +3 -0
- package/locales/{et.js → et/index.js} +2 -0
- package/locales/et/package.json +6 -0
- package/locales/fa/index.d.ts +3 -0
- package/locales/fa/index.esm.d.ts +3 -0
- package/locales/{fa.js → fa/index.js} +2 -0
- package/locales/fa/package.json +6 -0
- package/locales/fi/index.d.ts +3 -0
- package/locales/fi/index.esm.d.ts +3 -0
- package/locales/{fi.js → fi/index.js} +2 -0
- package/locales/fi/package.json +6 -0
- package/locales/fr/index.d.ts +3 -0
- package/locales/fr/index.esm.d.ts +3 -0
- package/locales/{fr.js → fr/index.js} +2 -0
- package/locales/fr/package.json +6 -0
- package/locales/hu/index.d.ts +3 -0
- package/locales/hu/index.esm.d.ts +3 -0
- package/locales/{hu.js → hu/index.js} +2 -0
- package/locales/hu/package.json +6 -0
- package/locales/hy/index.d.ts +3 -0
- package/locales/hy/index.esm.d.ts +3 -0
- package/locales/{hy.js → hy/index.js} +2 -0
- package/locales/hy/package.json +6 -0
- package/locales/id/index.d.ts +3 -0
- package/locales/id/index.esm.d.ts +3 -0
- package/locales/{id.js → id/index.js} +2 -0
- package/locales/id/package.json +6 -0
- package/locales/it/index.d.ts +3 -0
- package/locales/it/index.esm.d.ts +3 -0
- package/locales/{it.js → it/index.js} +2 -0
- package/locales/it/package.json +6 -0
- package/locales/ja/index.d.ts +3 -0
- package/locales/ja/index.esm.d.ts +3 -0
- package/locales/{ja.js → ja/index.js} +2 -0
- package/locales/ja/package.json +6 -0
- package/locales/ko/index.d.ts +3 -0
- package/locales/ko/index.esm.d.ts +3 -0
- package/locales/{ko.js → ko/index.js} +2 -0
- package/locales/ko/package.json +6 -0
- package/locales/nl/index.d.ts +3 -0
- package/locales/nl/index.esm.d.ts +3 -0
- package/locales/{nl.js → nl/index.js} +2 -0
- package/locales/nl/package.json +6 -0
- package/locales/no/index.d.ts +3 -0
- package/locales/no/index.esm.d.ts +3 -0
- package/locales/{no.js → no/index.js} +2 -0
- package/locales/no/package.json +6 -0
- package/locales/np/index.d.ts +3 -0
- package/locales/np/index.esm.d.ts +3 -0
- package/locales/{np.js → np/index.js} +2 -0
- package/locales/np/package.json +6 -0
- package/locales/pl/index.d.ts +3 -0
- package/locales/pl/index.esm.d.ts +3 -0
- package/locales/{pl.js → pl/index.js} +2 -0
- package/locales/pl/package.json +6 -0
- package/locales/pt/index.d.ts +3 -0
- package/locales/pt/index.esm.d.ts +3 -0
- package/locales/{pt.js → pt/index.js} +2 -0
- package/locales/pt/package.json +6 -0
- package/locales/pt-BR/index.d.ts +3 -0
- package/locales/pt-BR/index.esm.d.ts +3 -0
- package/locales/{pt-BR.js → pt-BR/index.js} +2 -0
- package/locales/pt-BR/package.json +6 -0
- package/locales/ro/index.d.ts +3 -0
- package/locales/ro/index.esm.d.ts +3 -0
- package/locales/{ro.js → ro/index.js} +2 -0
- package/locales/ro/package.json +6 -0
- package/locales/ru/index.d.ts +3 -0
- package/locales/ru/index.esm.d.ts +3 -0
- package/locales/{ru.js → ru/index.js} +2 -0
- package/locales/ru/package.json +6 -0
- package/locales/sk/index.d.ts +3 -0
- package/locales/sk/index.esm.d.ts +3 -0
- package/locales/{sk.js → sk/index.js} +2 -0
- package/locales/sk/package.json +6 -0
- package/locales/sr-Cyrl-RS/index.d.ts +3 -0
- package/locales/sr-Cyrl-RS/index.esm.d.ts +3 -0
- package/locales/{sr-Cyrl-RS.js → sr-Cyrl-RS/index.js} +2 -0
- package/locales/sr-Cyrl-RS/package.json +6 -0
- package/locales/sr-Latn-RS/index.d.ts +3 -0
- package/locales/sr-Latn-RS/index.esm.d.ts +3 -0
- package/locales/{sr-Latn-RS.js → sr-Latn-RS/index.js} +2 -0
- package/locales/sr-Latn-RS/package.json +6 -0
- package/locales/sv/index.d.ts +3 -0
- package/locales/sv/index.esm.d.ts +3 -0
- package/locales/{sv.js → sv/index.js} +2 -0
- package/locales/sv/package.json +6 -0
- package/locales/tr/index.d.ts +3 -0
- package/locales/tr/index.esm.d.ts +3 -0
- package/locales/{tr.js → tr/index.js} +2 -0
- package/locales/tr/package.json +6 -0
- package/locales/uk/index.d.ts +3 -0
- package/locales/uk/index.esm.d.ts +3 -0
- package/locales/{uk.js → uk/index.js} +2 -0
- package/locales/uk/package.json +6 -0
- package/locales/vi/index.d.ts +3 -0
- package/locales/vi/index.esm.d.ts +3 -0
- package/locales/{vi.js → vi/index.js} +2 -0
- package/locales/vi/package.json +6 -0
- package/locales/zh-Hans/index.d.ts +3 -0
- package/locales/zh-Hans/index.esm.d.ts +3 -0
- package/locales/{zh-Hans.mjs → zh-Hans/index.esm.js} +3 -3
- package/locales/{zh-Hans.js → zh-Hans/index.js} +5 -3
- package/locales/zh-Hans/package.json +6 -0
- package/locales/zh-Hant/index.d.ts +3 -0
- package/locales/zh-Hant/index.esm.d.ts +3 -0
- package/locales/{zh-Hant.js → zh-Hant/index.js} +2 -0
- package/locales/zh-Hant/package.json +6 -0
- package/package.json +25 -210
- package/src/body/MRT_TableBodyCell.tsx +2 -2
- package/src/body/MRT_TableBodyCellValue.tsx +1 -1
- package/src/column.utils.ts +17 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useMRT_TableOptions.ts +2 -2
- package/src/index.ts +1 -0
- package/src/inputs/MRT_EditCellTextField.tsx +20 -30
- package/src/inputs/MRT_FilterTextField.tsx +39 -51
- package/src/locales/zh-Hans.ts +3 -3
- package/src/table/MRT_TablePaper.tsx +6 -6
- package/src/types.ts +23 -4
- package/dist/cjs/index.js.map +0 -1
- package/dist/esm/material-react-table.esm.js.map +0 -1
- /package/locales/{ar.mjs → ar/index.esm.js} +0 -0
- /package/locales/{az.mjs → az/index.esm.js} +0 -0
- /package/locales/{bg.mjs → bg/index.esm.js} +0 -0
- /package/locales/{cs.mjs → cs/index.esm.js} +0 -0
- /package/locales/{da.mjs → da/index.esm.js} +0 -0
- /package/locales/{de.mjs → de/index.esm.js} +0 -0
- /package/locales/{en.mjs → en/index.esm.js} +0 -0
- /package/locales/{es.mjs → es/index.esm.js} +0 -0
- /package/locales/{et.mjs → et/index.esm.js} +0 -0
- /package/locales/{fa.mjs → fa/index.esm.js} +0 -0
- /package/locales/{fi.mjs → fi/index.esm.js} +0 -0
- /package/locales/{fr.mjs → fr/index.esm.js} +0 -0
- /package/locales/{hu.mjs → hu/index.esm.js} +0 -0
- /package/locales/{hy.mjs → hy/index.esm.js} +0 -0
- /package/locales/{id.mjs → id/index.esm.js} +0 -0
- /package/locales/{it.mjs → it/index.esm.js} +0 -0
- /package/locales/{ja.mjs → ja/index.esm.js} +0 -0
- /package/locales/{ko.mjs → ko/index.esm.js} +0 -0
- /package/locales/{nl.mjs → nl/index.esm.js} +0 -0
- /package/locales/{no.mjs → no/index.esm.js} +0 -0
- /package/locales/{np.mjs → np/index.esm.js} +0 -0
- /package/locales/{pl.mjs → pl/index.esm.js} +0 -0
- /package/locales/{pt.mjs → pt/index.esm.js} +0 -0
- /package/locales/{pt-BR.mjs → pt-BR/index.esm.js} +0 -0
- /package/locales/{ro.mjs → ro/index.esm.js} +0 -0
- /package/locales/{ru.mjs → ru/index.esm.js} +0 -0
- /package/locales/{sk.mjs → sk/index.esm.js} +0 -0
- /package/locales/{sr-Cyrl-RS.mjs → sr-Cyrl-RS/index.esm.js} +0 -0
- /package/locales/{sr-Latn-RS.mjs → sr-Latn-RS/index.esm.js} +0 -0
- /package/locales/{sv.mjs → sv/index.esm.js} +0 -0
- /package/locales/{tr.mjs → tr/index.esm.js} +0 -0
- /package/locales/{uk.mjs → uk/index.esm.js} +0 -0
- /package/locales/{vi.mjs → vi/index.esm.js} +0 -0
- /package/locales/{zh-Hant.mjs → zh-Hant/index.esm.js} +0 -0
@@ -0,0 +1,844 @@
|
|
1
|
+
import { type CSSProperties, type Dispatch, type MutableRefObject, type ReactNode, type RefObject, type SetStateAction } from 'react';
|
2
|
+
import { type AccessorFn, type AggregationFn, type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingInfoState, type ColumnSizingState, type DeepKeys, type DeepValue, type ExpandedState, type FilterFn, type GroupingState, type Header, type HeaderGroup, type OnChangeFn, type PaginationState, type Row, type RowSelectionState, type SortingFn, type SortingState, type Table, type TableOptions, type TableState, type Updater, type VisibilityState } from '@tanstack/react-table';
|
3
|
+
import { type VirtualItem, type Virtualizer, type VirtualizerOptions } from '@tanstack/react-virtual';
|
4
|
+
import { type AlertProps } from '@mui/material/Alert';
|
5
|
+
import { type AutocompleteProps } from '@mui/material/Autocomplete';
|
6
|
+
import { type BoxProps } from '@mui/material/Box';
|
7
|
+
import { type ButtonProps } from '@mui/material/Button';
|
8
|
+
import { type CheckboxProps } from '@mui/material/Checkbox';
|
9
|
+
import { type ChipProps } from '@mui/material/Chip';
|
10
|
+
import { type CircularProgressProps } from '@mui/material/CircularProgress';
|
11
|
+
import { type DialogProps } from '@mui/material/Dialog';
|
12
|
+
import { type IconButtonProps } from '@mui/material/IconButton';
|
13
|
+
import { type LinearProgressProps } from '@mui/material/LinearProgress';
|
14
|
+
import { type PaginationProps } from '@mui/material/Pagination';
|
15
|
+
import { type PaperProps } from '@mui/material/Paper';
|
16
|
+
import { type RadioProps } from '@mui/material/Radio';
|
17
|
+
import { type SkeletonProps } from '@mui/material/Skeleton';
|
18
|
+
import { type SliderProps } from '@mui/material/Slider';
|
19
|
+
import { type TableProps } from '@mui/material/Table';
|
20
|
+
import { type TableBodyProps } from '@mui/material/TableBody';
|
21
|
+
import { type TableCellProps } from '@mui/material/TableCell';
|
22
|
+
import { type TableContainerProps } from '@mui/material/TableContainer';
|
23
|
+
import { type TableFooterProps } from '@mui/material/TableFooter';
|
24
|
+
import { type TableHeadProps } from '@mui/material/TableHead';
|
25
|
+
import { type TableRowProps } from '@mui/material/TableRow';
|
26
|
+
import { type TextFieldProps } from '@mui/material/TextField';
|
27
|
+
import { type Theme } from '@mui/material/styles';
|
28
|
+
import { type DatePickerProps } from '@mui/x-date-pickers';
|
29
|
+
import { type MRT_AggregationFns } from './aggregationFns';
|
30
|
+
import { type MRT_FilterFns } from './filterFns';
|
31
|
+
import { type MRT_Icons } from './icons';
|
32
|
+
import { type MRT_SortingFns } from './sortingFns';
|
33
|
+
export type { MRT_Icons };
|
34
|
+
export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
|
35
|
+
export type Prettify<T> = {
|
36
|
+
[K in keyof T]: T[K];
|
37
|
+
} & unknown;
|
38
|
+
export type Xor<A, B> = Prettify<A & {
|
39
|
+
[k in keyof B]?: never;
|
40
|
+
}> | Prettify<B & {
|
41
|
+
[k in keyof A]?: never;
|
42
|
+
}>;
|
43
|
+
export type MRT_DensityState = 'comfortable' | 'compact' | 'spacious';
|
44
|
+
export type MRT_ColumnFilterFnsState = Record<string, MRT_FilterOption>;
|
45
|
+
export type MRT_RowData = Record<string, any>;
|
46
|
+
export type { ColumnFiltersState as MRT_ColumnFiltersState, ColumnOrderState as MRT_ColumnOrderState, ColumnPinningState as MRT_ColumnPinningState, ColumnSizingInfoState as MRT_ColumnSizingInfoState, ColumnSizingState as MRT_ColumnSizingState, ExpandedState as MRT_ExpandedState, GroupingState as MRT_GroupingState, PaginationState as MRT_PaginationState, RowSelectionState as MRT_RowSelectionState, SortingState as MRT_SortingState, Updater as MRT_Updater, VirtualItem as MRT_VirtualItem, Virtualizer as MRT_Virtualizer, VirtualizerOptions as MRT_VirtualizerOptions, VisibilityState as MRT_VisibilityState, };
|
47
|
+
export type MRT_ColumnHelper<TData extends MRT_RowData> = {
|
48
|
+
accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: MRT_DisplayColumnDef<TData, TValue>) => MRT_ColumnDef<TData, TValue>;
|
49
|
+
display: (column: MRT_DisplayColumnDef<TData>) => MRT_ColumnDef<TData>;
|
50
|
+
group: (column: MRT_GroupColumnDef<TData>) => MRT_ColumnDef<TData>;
|
51
|
+
};
|
52
|
+
export interface MRT_Localization {
|
53
|
+
actions: string;
|
54
|
+
and: string;
|
55
|
+
cancel: string;
|
56
|
+
changeFilterMode: string;
|
57
|
+
changeSearchMode: string;
|
58
|
+
clearFilter: string;
|
59
|
+
clearSearch: string;
|
60
|
+
clearSort: string;
|
61
|
+
clickToCopy: string;
|
62
|
+
collapse: string;
|
63
|
+
collapseAll: string;
|
64
|
+
columnActions: string;
|
65
|
+
copiedToClipboard: string;
|
66
|
+
dropToGroupBy: string;
|
67
|
+
edit: string;
|
68
|
+
expand: string;
|
69
|
+
expandAll: string;
|
70
|
+
filterArrIncludes: string;
|
71
|
+
filterArrIncludesAll: string;
|
72
|
+
filterArrIncludesSome: string;
|
73
|
+
filterBetween: string;
|
74
|
+
filterBetweenInclusive: string;
|
75
|
+
filterByColumn: string;
|
76
|
+
filterContains: string;
|
77
|
+
filterEmpty: string;
|
78
|
+
filterEndsWith: string;
|
79
|
+
filterEquals: string;
|
80
|
+
filterEqualsString: string;
|
81
|
+
filterFuzzy: string;
|
82
|
+
filterGreaterThan: string;
|
83
|
+
filterGreaterThanOrEqualTo: string;
|
84
|
+
filterInNumberRange: string;
|
85
|
+
filterIncludesString: string;
|
86
|
+
filterIncludesStringSensitive: string;
|
87
|
+
filterLessThan: string;
|
88
|
+
filterLessThanOrEqualTo: string;
|
89
|
+
filterMode: string;
|
90
|
+
filterNotEmpty: string;
|
91
|
+
filterNotEquals: string;
|
92
|
+
filterStartsWith: string;
|
93
|
+
filterWeakEquals: string;
|
94
|
+
filteringByColumn: string;
|
95
|
+
goToFirstPage: string;
|
96
|
+
goToLastPage: string;
|
97
|
+
goToNextPage: string;
|
98
|
+
goToPreviousPage: string;
|
99
|
+
grab: string;
|
100
|
+
groupByColumn: string;
|
101
|
+
groupedBy: string;
|
102
|
+
hideAll: string;
|
103
|
+
hideColumn: string;
|
104
|
+
max: string;
|
105
|
+
min: string;
|
106
|
+
move: string;
|
107
|
+
noRecordsToDisplay: string;
|
108
|
+
noResultsFound: string;
|
109
|
+
of: string;
|
110
|
+
or: string;
|
111
|
+
pin: string;
|
112
|
+
pinToLeft: string;
|
113
|
+
pinToRight: string;
|
114
|
+
resetColumnSize: string;
|
115
|
+
resetOrder: string;
|
116
|
+
rowActions: string;
|
117
|
+
rowNumber: string;
|
118
|
+
rowNumbers: string;
|
119
|
+
rowsPerPage: string;
|
120
|
+
save: string;
|
121
|
+
search: string;
|
122
|
+
select: string;
|
123
|
+
selectedCountOfRowCountRowsSelected: string;
|
124
|
+
showAll: string;
|
125
|
+
showAllColumns: string;
|
126
|
+
showHideColumns: string;
|
127
|
+
showHideFilters: string;
|
128
|
+
showHideSearch: string;
|
129
|
+
sortByColumnAsc: string;
|
130
|
+
sortByColumnDesc: string;
|
131
|
+
sortedByColumnAsc: string;
|
132
|
+
sortedByColumnDesc: string;
|
133
|
+
thenBy: string;
|
134
|
+
toggleDensity: string;
|
135
|
+
toggleFullScreen: string;
|
136
|
+
toggleSelectAll: string;
|
137
|
+
toggleSelectRow: string;
|
138
|
+
toggleVisibility: string;
|
139
|
+
ungroupByColumn: string;
|
140
|
+
unpin: string;
|
141
|
+
unpinAll: string;
|
142
|
+
}
|
143
|
+
export interface MRT_Theme {
|
144
|
+
baseBackgroundColor?: CSSProperties['backgroundColor'];
|
145
|
+
draggingBorderColor?: CSSProperties['borderColor'];
|
146
|
+
matchHighlightColor?: CSSProperties['backgroundColor'];
|
147
|
+
pinnedRowBackgroundColor?: CSSProperties['backgroundColor'];
|
148
|
+
selectedRowBackgroundColor?: CSSProperties['backgroundColor'];
|
149
|
+
}
|
150
|
+
export interface MRT_RowModel<TData extends MRT_RowData> {
|
151
|
+
flatRows: MRT_Row<TData>[];
|
152
|
+
rows: MRT_Row<TData>[];
|
153
|
+
rowsById: {
|
154
|
+
[key: string]: MRT_Row<TData>;
|
155
|
+
};
|
156
|
+
}
|
157
|
+
export type MRT_TableInstance<TData extends MRT_RowData> = Omit<Table<TData>, 'getAllColumns' | 'getAllFlatColumns' | 'getAllLeafColumns' | 'getBottomRows' | 'getCenterLeafColumns' | 'getCenterRows' | 'getColumn' | 'getExpandedRowModel' | 'getFlatHeaders' | 'getHeaderGroups' | 'getLeftLeafColumns' | 'getPaginationRowModel' | 'getPreFilteredRowModel' | 'getPrePaginationRowModel' | 'getRightLeafColumns' | 'getRowModel' | 'getSelectedRowModel' | 'getState' | 'getTopRows' | 'options'> & {
|
158
|
+
getAllColumns: () => MRT_Column<TData>[];
|
159
|
+
getAllFlatColumns: () => MRT_Column<TData>[];
|
160
|
+
getAllLeafColumns: () => MRT_Column<TData>[];
|
161
|
+
getBottomRows: () => MRT_Row<TData>[];
|
162
|
+
getCenterLeafColumns: () => MRT_Column<TData>[];
|
163
|
+
getCenterRows: () => MRT_Row<TData>[];
|
164
|
+
getColumn: (columnId: string) => MRT_Column<TData>;
|
165
|
+
getExpandedRowModel: () => MRT_RowModel<TData>;
|
166
|
+
getFlatHeaders: () => MRT_Header<TData>[];
|
167
|
+
getHeaderGroups: () => MRT_HeaderGroup<TData>[];
|
168
|
+
getLeftLeafColumns: () => MRT_Column<TData>[];
|
169
|
+
getPaginationRowModel: () => MRT_RowModel<TData>;
|
170
|
+
getPreFilteredRowModel: () => MRT_RowModel<TData>;
|
171
|
+
getPrePaginationRowModel: () => MRT_RowModel<TData>;
|
172
|
+
getRightLeafColumns: () => MRT_Column<TData>[];
|
173
|
+
getRowModel: () => MRT_RowModel<TData>;
|
174
|
+
getSelectedRowModel: () => MRT_RowModel<TData>;
|
175
|
+
getState: () => MRT_TableState<TData>;
|
176
|
+
getTopRows: () => MRT_Row<TData>[];
|
177
|
+
options: MRT_DefinedTableOptions<TData>;
|
178
|
+
refs: {
|
179
|
+
bottomToolbarRef: MutableRefObject<HTMLDivElement>;
|
180
|
+
editInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
|
181
|
+
filterInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
|
182
|
+
searchInputRef: MutableRefObject<HTMLInputElement>;
|
183
|
+
tableContainerRef: MutableRefObject<HTMLDivElement>;
|
184
|
+
tableFooterRef: MutableRefObject<HTMLTableSectionElement>;
|
185
|
+
tableHeadCellRefs: MutableRefObject<Record<string, HTMLTableCellElement>>;
|
186
|
+
tableHeadRef: MutableRefObject<HTMLTableSectionElement>;
|
187
|
+
tablePaperRef: MutableRefObject<HTMLDivElement>;
|
188
|
+
topToolbarRef: MutableRefObject<HTMLDivElement>;
|
189
|
+
};
|
190
|
+
setColumnFilterFns: Dispatch<SetStateAction<MRT_ColumnFilterFnsState>>;
|
191
|
+
setCreatingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | true>>;
|
192
|
+
setDensity: Dispatch<SetStateAction<MRT_DensityState>>;
|
193
|
+
setDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
|
194
|
+
setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
|
195
|
+
setEditingCell: Dispatch<SetStateAction<MRT_Cell<TData> | null>>;
|
196
|
+
setEditingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
|
197
|
+
setGlobalFilterFn: Dispatch<SetStateAction<MRT_FilterOption>>;
|
198
|
+
setHoveredColumn: Dispatch<SetStateAction<Partial<MRT_Column<TData>> | null>>;
|
199
|
+
setHoveredRow: Dispatch<SetStateAction<Partial<MRT_Row<TData>> | null>>;
|
200
|
+
setIsFullScreen: Dispatch<SetStateAction<boolean>>;
|
201
|
+
setShowAlertBanner: Dispatch<SetStateAction<boolean>>;
|
202
|
+
setShowColumnFilters: Dispatch<SetStateAction<boolean>>;
|
203
|
+
setShowGlobalFilter: Dispatch<SetStateAction<boolean>>;
|
204
|
+
setShowToolbarDropZone: Dispatch<SetStateAction<boolean>>;
|
205
|
+
};
|
206
|
+
export type MRT_DefinedTableOptions<TData extends MRT_RowData> = MRT_TableOptions<TData> & {
|
207
|
+
icons: MRT_Icons;
|
208
|
+
localization: MRT_Localization;
|
209
|
+
};
|
210
|
+
export type MRT_TableState<TData extends MRT_RowData> = TableState & {
|
211
|
+
columnFilterFns: MRT_ColumnFilterFnsState;
|
212
|
+
creatingRow: MRT_Row<TData> | null;
|
213
|
+
density: MRT_DensityState;
|
214
|
+
draggingColumn: MRT_Column<TData> | null;
|
215
|
+
draggingRow: MRT_Row<TData> | null;
|
216
|
+
editingCell: MRT_Cell<TData> | null;
|
217
|
+
editingRow: MRT_Row<TData> | null;
|
218
|
+
globalFilterFn: MRT_FilterOption;
|
219
|
+
hoveredColumn: Partial<MRT_Column<TData>> | null;
|
220
|
+
hoveredRow: Partial<MRT_Row<TData>> | null;
|
221
|
+
isFullScreen: boolean;
|
222
|
+
isLoading: boolean;
|
223
|
+
isSaving: boolean;
|
224
|
+
showAlertBanner: boolean;
|
225
|
+
showColumnFilters: boolean;
|
226
|
+
showGlobalFilter: boolean;
|
227
|
+
showLoadingOverlay: boolean;
|
228
|
+
showProgressBars: boolean;
|
229
|
+
showSkeletons: boolean;
|
230
|
+
showToolbarDropZone: boolean;
|
231
|
+
};
|
232
|
+
export type MRT_ColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<ColumnDef<TData, TValue>, 'accessorKey' | 'aggregatedCell' | 'aggregationFn' | 'cell' | 'columns' | 'filterFn' | 'footer' | 'header' | 'id' | 'sortingFn'> & {
|
233
|
+
AggregatedCell?: (props: {
|
234
|
+
cell: MRT_Cell<TData, TValue>;
|
235
|
+
column: MRT_Column<TData, TValue>;
|
236
|
+
row: MRT_Row<TData>;
|
237
|
+
table: MRT_TableInstance<TData>;
|
238
|
+
}) => ReactNode;
|
239
|
+
Cell?: (props: {
|
240
|
+
cell: MRT_Cell<TData, TValue>;
|
241
|
+
column: MRT_Column<TData, TValue>;
|
242
|
+
renderedCellValue: ReactNode;
|
243
|
+
row: MRT_Row<TData>;
|
244
|
+
rowRef?: RefObject<HTMLTableRowElement>;
|
245
|
+
table: MRT_TableInstance<TData>;
|
246
|
+
}) => ReactNode;
|
247
|
+
Edit?: (props: {
|
248
|
+
cell: MRT_Cell<TData, TValue>;
|
249
|
+
column: MRT_Column<TData, TValue>;
|
250
|
+
row: MRT_Row<TData>;
|
251
|
+
table: MRT_TableInstance<TData>;
|
252
|
+
}) => ReactNode;
|
253
|
+
Filter?: (props: {
|
254
|
+
column: MRT_Column<TData, TValue>;
|
255
|
+
header: MRT_Header<TData>;
|
256
|
+
rangeFilterIndex?: number;
|
257
|
+
table: MRT_TableInstance<TData>;
|
258
|
+
}) => ReactNode;
|
259
|
+
Footer?: ((props: {
|
260
|
+
column: MRT_Column<TData, TValue>;
|
261
|
+
footer: MRT_Header<TData>;
|
262
|
+
table: MRT_TableInstance<TData>;
|
263
|
+
}) => ReactNode) | ReactNode;
|
264
|
+
GroupedCell?: (props: {
|
265
|
+
cell: MRT_Cell<TData, TValue>;
|
266
|
+
column: MRT_Column<TData, TValue>;
|
267
|
+
row: MRT_Row<TData>;
|
268
|
+
table: MRT_TableInstance<TData>;
|
269
|
+
}) => ReactNode;
|
270
|
+
Header?: ((props: {
|
271
|
+
column: MRT_Column<TData, TValue>;
|
272
|
+
header: MRT_Header<TData>;
|
273
|
+
table: MRT_TableInstance<TData>;
|
274
|
+
}) => ReactNode) | ReactNode;
|
275
|
+
PlaceholderCell?: (props: {
|
276
|
+
cell: MRT_Cell<TData, TValue>;
|
277
|
+
column: MRT_Column<TData, TValue>;
|
278
|
+
row: MRT_Row<TData>;
|
279
|
+
table: MRT_TableInstance<TData>;
|
280
|
+
}) => ReactNode;
|
281
|
+
/**
|
282
|
+
* Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
|
283
|
+
* Specify a function here to point to the correct property in the data object.
|
284
|
+
*
|
285
|
+
* @example accessorFn: (row) => row.username
|
286
|
+
*/
|
287
|
+
accessorFn?: (originalRow: TData) => TValue;
|
288
|
+
/**
|
289
|
+
* Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
|
290
|
+
* Specify which key in the row this column should use to access the correct data.
|
291
|
+
* Also supports Deep Key Dot Notation.
|
292
|
+
*
|
293
|
+
* @example accessorKey: 'username' //simple
|
294
|
+
* @example accessorKey: 'name.firstName' //deep key dot notation
|
295
|
+
*/
|
296
|
+
accessorKey?: DeepKeys<TData> | (string & {});
|
297
|
+
aggregationFn?: Array<MRT_AggregationFn<TData>> | MRT_AggregationFn<TData>;
|
298
|
+
/**
|
299
|
+
* Specify what type of column this is. Either `data`, `display`, or `group`. Defaults to `data`.
|
300
|
+
* Leave this blank if you are just creating a normal data column.
|
301
|
+
*
|
302
|
+
* @default 'data'
|
303
|
+
*
|
304
|
+
* @example columnDefType: 'display'
|
305
|
+
*/
|
306
|
+
columnDefType?: 'data' | 'display' | 'group';
|
307
|
+
columnFilterModeOptions?: Array<LiteralUnion<string & MRT_FilterOption>> | null;
|
308
|
+
columns?: MRT_ColumnDef<TData, TValue>[];
|
309
|
+
editSelectOptions?: ({
|
310
|
+
label?: string;
|
311
|
+
/**
|
312
|
+
* @deprecated use `label` instead
|
313
|
+
*/
|
314
|
+
text?: string;
|
315
|
+
value: any;
|
316
|
+
} | string)[];
|
317
|
+
editVariant?: 'select' | 'text';
|
318
|
+
enableClickToCopy?: boolean;
|
319
|
+
enableColumnActions?: boolean;
|
320
|
+
enableColumnDragging?: boolean;
|
321
|
+
enableColumnFilterModes?: boolean;
|
322
|
+
enableColumnOrdering?: boolean;
|
323
|
+
enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
|
324
|
+
enableFilterMatchHighlighting?: boolean;
|
325
|
+
filterFn?: MRT_FilterFn<TData>;
|
326
|
+
filterSelectOptions?: ({
|
327
|
+
label?: string;
|
328
|
+
/**
|
329
|
+
* @deprecated use `label` instead
|
330
|
+
*/
|
331
|
+
text?: string;
|
332
|
+
value: any;
|
333
|
+
} | string)[];
|
334
|
+
filterVariant?: 'autocomplete' | 'checkbox' | 'date' | 'date-range' | 'multi-select' | 'range' | 'range-slider' | 'select' | 'text';
|
335
|
+
/**
|
336
|
+
* footer must be a string. If you want custom JSX to render the footer, you can also specify a `Footer` option. (Capital F)
|
337
|
+
*/
|
338
|
+
footer?: string;
|
339
|
+
/**
|
340
|
+
* header must be a string. If you want custom JSX to render the header, you can also specify a `Header` option. (Capital H)
|
341
|
+
*/
|
342
|
+
header: string;
|
343
|
+
/**
|
344
|
+
* Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
|
345
|
+
*
|
346
|
+
* If you have also specified an `accessorFn`, MRT still needs to have a valid `id` to be able to identify the column uniquely.
|
347
|
+
*
|
348
|
+
* `id` defaults to the `accessorKey` or `header` if not specified.
|
349
|
+
*
|
350
|
+
* @default gets set to the same value as `accessorKey` by default
|
351
|
+
*/
|
352
|
+
id?: LiteralUnion<string & keyof TData>;
|
353
|
+
muiColumnActionsButtonProps?: ((props: {
|
354
|
+
column: MRT_Column<TData>;
|
355
|
+
table: MRT_TableInstance<TData>;
|
356
|
+
}) => IconButtonProps) | IconButtonProps;
|
357
|
+
muiColumnDragHandleProps?: ((props: {
|
358
|
+
column: MRT_Column<TData>;
|
359
|
+
table: MRT_TableInstance<TData>;
|
360
|
+
}) => IconButtonProps) | IconButtonProps;
|
361
|
+
muiCopyButtonProps?: ((props: {
|
362
|
+
cell: MRT_Cell<TData, TValue>;
|
363
|
+
column: MRT_Column<TData>;
|
364
|
+
row: MRT_Row<TData>;
|
365
|
+
table: MRT_TableInstance<TData>;
|
366
|
+
}) => ButtonProps) | ButtonProps;
|
367
|
+
muiEditTextFieldProps?: ((props: {
|
368
|
+
cell: MRT_Cell<TData, TValue>;
|
369
|
+
column: MRT_Column<TData>;
|
370
|
+
row: MRT_Row<TData>;
|
371
|
+
table: MRT_TableInstance<TData>;
|
372
|
+
}) => TextFieldProps) | TextFieldProps;
|
373
|
+
muiFilterAutocompleteProps?: ((props: {
|
374
|
+
column: MRT_Column<TData>;
|
375
|
+
table: MRT_TableInstance<TData>;
|
376
|
+
}) => AutocompleteProps<any, any, any, any>) | AutocompleteProps<any, any, any, any>;
|
377
|
+
muiFilterCheckboxProps?: ((props: {
|
378
|
+
column: MRT_Column<TData>;
|
379
|
+
table: MRT_TableInstance<TData>;
|
380
|
+
}) => CheckboxProps) | CheckboxProps;
|
381
|
+
muiFilterDatePickerProps?: ((props: {
|
382
|
+
column: MRT_Column<TData>;
|
383
|
+
rangeFilterIndex?: number;
|
384
|
+
table: MRT_TableInstance<TData>;
|
385
|
+
}) => DatePickerProps<any>) | DatePickerProps<any>;
|
386
|
+
muiFilterSliderProps?: ((props: {
|
387
|
+
column: MRT_Column<TData>;
|
388
|
+
table: MRT_TableInstance<TData>;
|
389
|
+
}) => SliderProps) | SliderProps;
|
390
|
+
muiFilterTextFieldProps?: ((props: {
|
391
|
+
column: MRT_Column<TData>;
|
392
|
+
rangeFilterIndex?: number;
|
393
|
+
table: MRT_TableInstance<TData>;
|
394
|
+
}) => TextFieldProps) | TextFieldProps;
|
395
|
+
muiTableBodyCellProps?: ((props: {
|
396
|
+
cell: MRT_Cell<TData, TValue>;
|
397
|
+
column: MRT_Column<TData>;
|
398
|
+
row: MRT_Row<TData>;
|
399
|
+
table: MRT_TableInstance<TData>;
|
400
|
+
}) => TableCellProps) | TableCellProps;
|
401
|
+
muiTableFooterCellProps?: ((props: {
|
402
|
+
column: MRT_Column<TData>;
|
403
|
+
table: MRT_TableInstance<TData>;
|
404
|
+
}) => TableCellProps) | TableCellProps;
|
405
|
+
muiTableHeadCellProps?: ((props: {
|
406
|
+
column: MRT_Column<TData>;
|
407
|
+
table: MRT_TableInstance<TData>;
|
408
|
+
}) => TableCellProps) | TableCellProps;
|
409
|
+
renderColumnActionsMenuItems?: (props: {
|
410
|
+
closeMenu: () => void;
|
411
|
+
column: MRT_Column<TData>;
|
412
|
+
internalColumnMenuItems: ReactNode[];
|
413
|
+
table: MRT_TableInstance<TData>;
|
414
|
+
}) => ReactNode[];
|
415
|
+
renderColumnFilterModeMenuItems?: (props: {
|
416
|
+
column: MRT_Column<TData>;
|
417
|
+
internalFilterOptions: MRT_InternalFilterOption[];
|
418
|
+
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
419
|
+
table: MRT_TableInstance<TData>;
|
420
|
+
}) => ReactNode[];
|
421
|
+
sortingFn?: MRT_SortingFn<TData>;
|
422
|
+
};
|
423
|
+
export type MRT_DisplayColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<MRT_ColumnDef<TData, TValue>, 'accessorFn' | 'accessorKey'>;
|
424
|
+
export type MRT_GroupColumnDef<TData extends MRT_RowData> = MRT_DisplayColumnDef<TData, any> & {
|
425
|
+
columns: MRT_ColumnDef<TData>[];
|
426
|
+
};
|
427
|
+
export type MRT_DefinedColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<MRT_ColumnDef<TData, TValue>, 'defaultDisplayColumn' | 'id'> & {
|
428
|
+
_filterFn: MRT_FilterOption;
|
429
|
+
defaultDisplayColumn: Partial<MRT_ColumnDef<TData, TValue>>;
|
430
|
+
id: string;
|
431
|
+
};
|
432
|
+
export type MRT_Column<TData extends MRT_RowData, TValue = unknown> = Omit<Column<TData, TValue>, 'columnDef' | 'columns' | 'filterFn' | 'footer' | 'header'> & {
|
433
|
+
columnDef: MRT_DefinedColumnDef<TData, TValue>;
|
434
|
+
columns?: MRT_Column<TData, TValue>[];
|
435
|
+
filterFn?: MRT_FilterFn<TData>;
|
436
|
+
footer: string;
|
437
|
+
header: string;
|
438
|
+
};
|
439
|
+
export type MRT_Header<TData extends MRT_RowData> = Omit<Header<TData, unknown>, 'column'> & {
|
440
|
+
column: MRT_Column<TData>;
|
441
|
+
};
|
442
|
+
export type MRT_HeaderGroup<TData extends MRT_RowData> = Omit<HeaderGroup<TData>, 'headers'> & {
|
443
|
+
headers: MRT_Header<TData>[];
|
444
|
+
};
|
445
|
+
export type MRT_Row<TData extends MRT_RowData> = Omit<Row<TData>, '_valuesCache' | 'getAllCells' | 'getVisibleCells' | 'subRows'> & {
|
446
|
+
_valuesCache: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
|
447
|
+
getAllCells: () => MRT_Cell<TData>[];
|
448
|
+
getVisibleCells: () => MRT_Cell<TData>[];
|
449
|
+
subRows?: MRT_Row<TData>[];
|
450
|
+
};
|
451
|
+
export type MRT_Cell<TData extends MRT_RowData, TValue = unknown> = Omit<Cell<TData, TValue>, 'column' | 'row'> & {
|
452
|
+
column: MRT_Column<TData, TValue>;
|
453
|
+
row: MRT_Row<TData>;
|
454
|
+
};
|
455
|
+
export type MRT_AggregationOption = string & keyof typeof MRT_AggregationFns;
|
456
|
+
export type MRT_AggregationFn<TData extends MRT_RowData> = AggregationFn<TData> | MRT_AggregationOption;
|
457
|
+
export type MRT_SortingOption = LiteralUnion<string & keyof typeof MRT_SortingFns>;
|
458
|
+
export type MRT_SortingFn<TData extends MRT_RowData> = MRT_SortingOption | SortingFn<TData>;
|
459
|
+
export type MRT_FilterOption = LiteralUnion<string & keyof typeof MRT_FilterFns>;
|
460
|
+
export type MRT_FilterFn<TData extends MRT_RowData> = FilterFn<TData> | MRT_FilterOption;
|
461
|
+
export type MRT_InternalFilterOption = {
|
462
|
+
divider: boolean;
|
463
|
+
label: string;
|
464
|
+
option: string;
|
465
|
+
symbol: string;
|
466
|
+
};
|
467
|
+
export type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-row-expand' | 'mrt-row-numbers' | 'mrt-row-pin' | 'mrt-row-select' | 'mrt-row-spacer';
|
468
|
+
/**
|
469
|
+
* `columns` and `data` props are the only required props, but there are over 170 other optional props.
|
470
|
+
*
|
471
|
+
* See more info on creating columns and data on the official docs site:
|
472
|
+
* @link https://www.material-react-table.com/docs/getting-started/usage
|
473
|
+
*
|
474
|
+
* See the full props list on the official docs site:
|
475
|
+
* @link https://www.material-react-table.com/docs/api/props
|
476
|
+
*/
|
477
|
+
export type MRT_TableOptions<TData extends MRT_RowData> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'getRowId' | 'globalFilterFn' | 'initialState' | 'onStateChange' | 'state'> & {
|
478
|
+
columnFilterDisplayMode?: 'custom' | 'popover' | 'subheader';
|
479
|
+
columnFilterModeOptions?: Array<LiteralUnion<string & MRT_FilterOption>> | null;
|
480
|
+
columnVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableCellElement> | null>;
|
481
|
+
columnVirtualizerOptions?: ((props: {
|
482
|
+
table: MRT_TableInstance<TData>;
|
483
|
+
}) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>;
|
484
|
+
/**
|
485
|
+
* The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
|
486
|
+
*
|
487
|
+
* See more info on creating columns on the official docs site:
|
488
|
+
* @link https://www.material-react-table.com/docs/guides/data-columns
|
489
|
+
* @link https://www.material-react-table.com/docs/guides/display-columns
|
490
|
+
*
|
491
|
+
* See all Columns Options on the official docs site:
|
492
|
+
* @link https://www.material-react-table.com/docs/api/column-options
|
493
|
+
*/
|
494
|
+
columns: MRT_ColumnDef<TData, any>[];
|
495
|
+
createDisplayMode?: 'custom' | 'modal' | 'row';
|
496
|
+
/**
|
497
|
+
* Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
|
498
|
+
*
|
499
|
+
* See the usage guide for more info on creating columns and data:
|
500
|
+
* @link https://www.material-react-table.com/docs/getting-started/usage
|
501
|
+
*/
|
502
|
+
data: TData[];
|
503
|
+
/**
|
504
|
+
* Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` prop to change a default option for all columns.
|
505
|
+
*/
|
506
|
+
defaultColumn?: Partial<MRT_ColumnDef<TData>>;
|
507
|
+
/**
|
508
|
+
* Change the default options for display columns.
|
509
|
+
*/
|
510
|
+
defaultDisplayColumn?: Partial<MRT_DisplayColumnDef<TData>>;
|
511
|
+
displayColumnDefOptions?: Partial<{
|
512
|
+
[key in MRT_DisplayColumnIds]: Partial<MRT_DisplayColumnDef<TData>>;
|
513
|
+
}>;
|
514
|
+
editDisplayMode?: 'cell' | 'custom' | 'modal' | 'row' | 'table';
|
515
|
+
enableBottomToolbar?: boolean;
|
516
|
+
enableClickToCopy?: boolean;
|
517
|
+
enableColumnActions?: boolean;
|
518
|
+
enableColumnDragging?: boolean;
|
519
|
+
enableColumnFilterModes?: boolean;
|
520
|
+
enableColumnOrdering?: boolean;
|
521
|
+
enableColumnVirtualization?: boolean;
|
522
|
+
enableDensityToggle?: boolean;
|
523
|
+
enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
|
524
|
+
enableExpandAll?: boolean;
|
525
|
+
enableFacetedValues?: boolean;
|
526
|
+
enableFilterMatchHighlighting?: boolean;
|
527
|
+
enableFullScreenToggle?: boolean;
|
528
|
+
enableGlobalFilterModes?: boolean;
|
529
|
+
enableGlobalFilterRankedResults?: boolean;
|
530
|
+
enablePagination?: boolean;
|
531
|
+
enableRowActions?: boolean;
|
532
|
+
enableRowDragging?: boolean;
|
533
|
+
enableRowNumbers?: boolean;
|
534
|
+
enableRowOrdering?: boolean;
|
535
|
+
enableRowSelection?: ((row: MRT_Row<TData>) => boolean) | boolean;
|
536
|
+
enableRowVirtualization?: boolean;
|
537
|
+
enableSelectAll?: boolean;
|
538
|
+
enableStickyFooter?: boolean;
|
539
|
+
enableStickyHeader?: boolean;
|
540
|
+
enableTableFooter?: boolean;
|
541
|
+
enableTableHead?: boolean;
|
542
|
+
enableToolbarInternalActions?: boolean;
|
543
|
+
enableTopToolbar?: boolean;
|
544
|
+
expandRowsFn?: (dataRow: TData) => TData[];
|
545
|
+
getRowId?: (originalRow: TData, index: number, parentRow: MRT_Row<TData>) => string;
|
546
|
+
globalFilterFn?: MRT_FilterOption;
|
547
|
+
globalFilterModeOptions?: MRT_FilterOption[] | null;
|
548
|
+
icons?: Partial<MRT_Icons>;
|
549
|
+
initialState?: Partial<MRT_TableState<TData>>;
|
550
|
+
/**
|
551
|
+
* Changes which kind of CSS layout is used to render the table. `semantic` uses default semantic HTML elements, while `grid` adds CSS grid and flexbox styles
|
552
|
+
*/
|
553
|
+
layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
|
554
|
+
/**
|
555
|
+
* Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
|
556
|
+
*
|
557
|
+
* See the localization (i18n) guide for more info:
|
558
|
+
* @link https://www.material-react-table.com/docs/guides/localization
|
559
|
+
*/
|
560
|
+
localization?: Partial<MRT_Localization>;
|
561
|
+
/**
|
562
|
+
* Memoize cells, rows, or the entire table body to potentially improve render performance.
|
563
|
+
*
|
564
|
+
* @warning This will break some dynamic rendering features. See the memoization guide for more info:
|
565
|
+
* @link https://www.material-react-table.com/docs/guides/memoize-components
|
566
|
+
*/
|
567
|
+
memoMode?: 'cells' | 'rows' | 'table-body';
|
568
|
+
mrtTheme?: ((theme: Theme) => MRT_Theme) | MRT_Theme;
|
569
|
+
muiBottomToolbarProps?: ((props: {
|
570
|
+
table: MRT_TableInstance<TData>;
|
571
|
+
}) => BoxProps) | BoxProps;
|
572
|
+
muiCircularProgressProps?: ((props: {
|
573
|
+
table: MRT_TableInstance<TData>;
|
574
|
+
}) => CircularProgressProps) | CircularProgressProps;
|
575
|
+
muiColumnActionsButtonProps?: ((props: {
|
576
|
+
column: MRT_Column<TData>;
|
577
|
+
table: MRT_TableInstance<TData>;
|
578
|
+
}) => IconButtonProps) | IconButtonProps;
|
579
|
+
muiColumnDragHandleProps?: ((props: {
|
580
|
+
column: MRT_Column<TData>;
|
581
|
+
table: MRT_TableInstance<TData>;
|
582
|
+
}) => IconButtonProps) | IconButtonProps;
|
583
|
+
muiCopyButtonProps?: ((props: {
|
584
|
+
cell: MRT_Cell<TData>;
|
585
|
+
column: MRT_Column<TData>;
|
586
|
+
row: MRT_Row<TData>;
|
587
|
+
table: MRT_TableInstance<TData>;
|
588
|
+
}) => ButtonProps) | ButtonProps;
|
589
|
+
muiCreateRowModalProps?: ((props: {
|
590
|
+
row: MRT_Row<TData>;
|
591
|
+
table: MRT_TableInstance<TData>;
|
592
|
+
}) => DialogProps) | DialogProps;
|
593
|
+
muiDetailPanelProps?: ((props: {
|
594
|
+
row: MRT_Row<TData>;
|
595
|
+
table: MRT_TableInstance<TData>;
|
596
|
+
}) => TableCellProps) | TableCellProps;
|
597
|
+
muiEditRowDialogProps?: ((props: {
|
598
|
+
row: MRT_Row<TData>;
|
599
|
+
table: MRT_TableInstance<TData>;
|
600
|
+
}) => DialogProps) | DialogProps;
|
601
|
+
muiEditTextFieldProps?: ((props: {
|
602
|
+
cell: MRT_Cell<TData>;
|
603
|
+
column: MRT_Column<TData>;
|
604
|
+
row: MRT_Row<TData>;
|
605
|
+
table: MRT_TableInstance<TData>;
|
606
|
+
}) => TextFieldProps) | TextFieldProps;
|
607
|
+
muiExpandAllButtonProps?: ((props: {
|
608
|
+
table: MRT_TableInstance<TData>;
|
609
|
+
}) => IconButtonProps) | IconButtonProps;
|
610
|
+
muiExpandButtonProps?: ((props: {
|
611
|
+
row: MRT_Row<TData>;
|
612
|
+
table: MRT_TableInstance<TData>;
|
613
|
+
}) => IconButtonProps) | IconButtonProps;
|
614
|
+
muiFilterAutocompleteProps?: ((props: {
|
615
|
+
column: MRT_Column<TData>;
|
616
|
+
table: MRT_TableInstance<TData>;
|
617
|
+
}) => AutocompleteProps<any, any, any, any>) | AutocompleteProps<any, any, any, any>;
|
618
|
+
muiFilterCheckboxProps?: ((props: {
|
619
|
+
column: MRT_Column<TData>;
|
620
|
+
table: MRT_TableInstance<TData>;
|
621
|
+
}) => CheckboxProps) | CheckboxProps;
|
622
|
+
muiFilterDatePickerProps?: ((props: {
|
623
|
+
column: MRT_Column<TData>;
|
624
|
+
rangeFilterIndex?: number;
|
625
|
+
table: MRT_TableInstance<TData>;
|
626
|
+
}) => DatePickerProps<any>) | DatePickerProps<any>;
|
627
|
+
muiFilterSliderProps?: ((props: {
|
628
|
+
column: MRT_Column<TData>;
|
629
|
+
table: MRT_TableInstance<TData>;
|
630
|
+
}) => SliderProps) | SliderProps;
|
631
|
+
muiFilterTextFieldProps?: ((props: {
|
632
|
+
column: MRT_Column<TData>;
|
633
|
+
rangeFilterIndex?: number;
|
634
|
+
table: MRT_TableInstance<TData>;
|
635
|
+
}) => TextFieldProps) | TextFieldProps;
|
636
|
+
muiLinearProgressProps?: ((props: {
|
637
|
+
isTopToolbar: boolean;
|
638
|
+
table: MRT_TableInstance<TData>;
|
639
|
+
}) => LinearProgressProps) | LinearProgressProps;
|
640
|
+
muiPaginationProps?: ((props: {
|
641
|
+
table: MRT_TableInstance<TData>;
|
642
|
+
}) => Partial<PaginationProps & {
|
643
|
+
rowsPerPageOptions?: number[];
|
644
|
+
showRowsPerPage?: boolean;
|
645
|
+
}>) | Partial<PaginationProps & {
|
646
|
+
rowsPerPageOptions?: number[];
|
647
|
+
showRowsPerPage?: boolean;
|
648
|
+
}>;
|
649
|
+
muiRowDragHandleProps?: ((props: {
|
650
|
+
row: MRT_Row<TData>;
|
651
|
+
table: MRT_TableInstance<TData>;
|
652
|
+
}) => IconButtonProps) | IconButtonProps;
|
653
|
+
muiSearchTextFieldProps?: ((props: {
|
654
|
+
table: MRT_TableInstance<TData>;
|
655
|
+
}) => TextFieldProps) | TextFieldProps;
|
656
|
+
muiSelectAllCheckboxProps?: ((props: {
|
657
|
+
table: MRT_TableInstance<TData>;
|
658
|
+
}) => CheckboxProps) | CheckboxProps;
|
659
|
+
muiSelectCheckboxProps?: ((props: {
|
660
|
+
row: MRT_Row<TData>;
|
661
|
+
table: MRT_TableInstance<TData>;
|
662
|
+
}) => CheckboxProps | RadioProps) | (CheckboxProps | RadioProps);
|
663
|
+
muiSkeletonProps?: ((props: {
|
664
|
+
cell: MRT_Cell<TData>;
|
665
|
+
column: MRT_Column<TData>;
|
666
|
+
row: MRT_Row<TData>;
|
667
|
+
table: MRT_TableInstance<TData>;
|
668
|
+
}) => SkeletonProps) | SkeletonProps;
|
669
|
+
muiTableBodyCellProps?: ((props: {
|
670
|
+
cell: MRT_Cell<TData>;
|
671
|
+
column: MRT_Column<TData>;
|
672
|
+
row: MRT_Row<TData>;
|
673
|
+
table: MRT_TableInstance<TData>;
|
674
|
+
}) => TableCellProps) | TableCellProps;
|
675
|
+
muiTableBodyProps?: ((props: {
|
676
|
+
table: MRT_TableInstance<TData>;
|
677
|
+
}) => TableBodyProps) | TableBodyProps;
|
678
|
+
muiTableBodyRowProps?: ((props: {
|
679
|
+
isDetailPanel?: boolean;
|
680
|
+
row: MRT_Row<TData>;
|
681
|
+
staticRowIndex: number;
|
682
|
+
table: MRT_TableInstance<TData>;
|
683
|
+
}) => TableRowProps) | TableRowProps;
|
684
|
+
muiTableContainerProps?: ((props: {
|
685
|
+
table: MRT_TableInstance<TData>;
|
686
|
+
}) => TableContainerProps) | TableContainerProps;
|
687
|
+
muiTableFooterCellProps?: ((props: {
|
688
|
+
column: MRT_Column<TData>;
|
689
|
+
table: MRT_TableInstance<TData>;
|
690
|
+
}) => TableCellProps) | TableCellProps;
|
691
|
+
muiTableFooterProps?: ((props: {
|
692
|
+
table: MRT_TableInstance<TData>;
|
693
|
+
}) => TableFooterProps) | TableFooterProps;
|
694
|
+
muiTableFooterRowProps?: ((props: {
|
695
|
+
footerGroup: MRT_HeaderGroup<TData>;
|
696
|
+
table: MRT_TableInstance<TData>;
|
697
|
+
}) => TableRowProps) | TableRowProps;
|
698
|
+
muiTableHeadCellProps?: ((props: {
|
699
|
+
column: MRT_Column<TData>;
|
700
|
+
table: MRT_TableInstance<TData>;
|
701
|
+
}) => TableCellProps) | TableCellProps;
|
702
|
+
muiTableHeadProps?: ((props: {
|
703
|
+
table: MRT_TableInstance<TData>;
|
704
|
+
}) => TableHeadProps) | TableHeadProps;
|
705
|
+
muiTableHeadRowProps?: ((props: {
|
706
|
+
headerGroup: MRT_HeaderGroup<TData>;
|
707
|
+
table: MRT_TableInstance<TData>;
|
708
|
+
}) => TableRowProps) | TableRowProps;
|
709
|
+
muiTablePaperProps?: ((props: {
|
710
|
+
table: MRT_TableInstance<TData>;
|
711
|
+
}) => PaperProps) | PaperProps;
|
712
|
+
muiTableProps?: ((props: {
|
713
|
+
table: MRT_TableInstance<TData>;
|
714
|
+
}) => TableProps) | TableProps;
|
715
|
+
muiToolbarAlertBannerChipProps?: ((props: {
|
716
|
+
table: MRT_TableInstance<TData>;
|
717
|
+
}) => ChipProps) | ChipProps;
|
718
|
+
muiToolbarAlertBannerProps?: ((props: {
|
719
|
+
table: MRT_TableInstance<TData>;
|
720
|
+
}) => AlertProps) | AlertProps;
|
721
|
+
muiTopToolbarProps?: ((props: {
|
722
|
+
table: MRT_TableInstance<TData>;
|
723
|
+
}) => BoxProps) | BoxProps;
|
724
|
+
onColumnFilterFnsChange?: OnChangeFn<{
|
725
|
+
[key: string]: MRT_FilterOption;
|
726
|
+
}>;
|
727
|
+
onCreatingRowCancel?: (props: {
|
728
|
+
row: MRT_Row<TData>;
|
729
|
+
table: MRT_TableInstance<TData>;
|
730
|
+
}) => void;
|
731
|
+
onCreatingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
732
|
+
onCreatingRowSave?: (props: {
|
733
|
+
exitCreatingMode: () => void;
|
734
|
+
row: MRT_Row<TData>;
|
735
|
+
table: MRT_TableInstance<TData>;
|
736
|
+
values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
|
737
|
+
}) => void;
|
738
|
+
onDensityChange?: OnChangeFn<MRT_DensityState>;
|
739
|
+
onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
740
|
+
onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
741
|
+
onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
|
742
|
+
onEditingRowCancel?: (props: {
|
743
|
+
row: MRT_Row<TData>;
|
744
|
+
table: MRT_TableInstance<TData>;
|
745
|
+
}) => void;
|
746
|
+
onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
747
|
+
onEditingRowSave?: (props: {
|
748
|
+
exitEditingMode: () => void;
|
749
|
+
row: MRT_Row<TData>;
|
750
|
+
table: MRT_TableInstance<TData>;
|
751
|
+
values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
|
752
|
+
}) => Promise<void> | void;
|
753
|
+
onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
|
754
|
+
onHoveredColumnChange?: OnChangeFn<Partial<MRT_Column<TData>> | null>;
|
755
|
+
onHoveredRowChange?: OnChangeFn<Partial<MRT_Row<TData>> | null>;
|
756
|
+
onIsFullScreenChange?: OnChangeFn<boolean>;
|
757
|
+
onShowAlertBannerChange?: OnChangeFn<boolean>;
|
758
|
+
onShowColumnFiltersChange?: OnChangeFn<boolean>;
|
759
|
+
onShowGlobalFilterChange?: OnChangeFn<boolean>;
|
760
|
+
onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
|
761
|
+
paginationDisplayMode?: 'custom' | 'default' | 'pages';
|
762
|
+
positionActionsColumn?: 'first' | 'last';
|
763
|
+
positionExpandColumn?: 'first' | 'last';
|
764
|
+
positionGlobalFilter?: 'left' | 'none' | 'right';
|
765
|
+
positionPagination?: 'both' | 'bottom' | 'none' | 'top';
|
766
|
+
positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
|
767
|
+
positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
|
768
|
+
renderBottomToolbar?: ((props: {
|
769
|
+
table: MRT_TableInstance<TData>;
|
770
|
+
}) => ReactNode) | ReactNode;
|
771
|
+
renderBottomToolbarCustomActions?: (props: {
|
772
|
+
table: MRT_TableInstance<TData>;
|
773
|
+
}) => ReactNode;
|
774
|
+
renderColumnActionsMenuItems?: (props: {
|
775
|
+
closeMenu: () => void;
|
776
|
+
column: MRT_Column<TData>;
|
777
|
+
internalColumnMenuItems: ReactNode[];
|
778
|
+
table: MRT_TableInstance<TData>;
|
779
|
+
}) => ReactNode[];
|
780
|
+
renderColumnFilterModeMenuItems?: (props: {
|
781
|
+
column: MRT_Column<TData>;
|
782
|
+
internalFilterOptions: MRT_InternalFilterOption[];
|
783
|
+
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
784
|
+
table: MRT_TableInstance<TData>;
|
785
|
+
}) => ReactNode[];
|
786
|
+
renderCreateRowDialogContent?: (props: {
|
787
|
+
internalEditComponents: ReactNode[];
|
788
|
+
row: MRT_Row<TData>;
|
789
|
+
table: MRT_TableInstance<TData>;
|
790
|
+
}) => ReactNode;
|
791
|
+
renderDetailPanel?: (props: {
|
792
|
+
row: MRT_Row<TData>;
|
793
|
+
table: MRT_TableInstance<TData>;
|
794
|
+
}) => ReactNode;
|
795
|
+
renderEditRowDialogContent?: (props: {
|
796
|
+
internalEditComponents: ReactNode[];
|
797
|
+
row: MRT_Row<TData>;
|
798
|
+
table: MRT_TableInstance<TData>;
|
799
|
+
}) => ReactNode;
|
800
|
+
renderEmptyRowsFallback?: (props: {
|
801
|
+
table: MRT_TableInstance<TData>;
|
802
|
+
}) => ReactNode;
|
803
|
+
renderGlobalFilterModeMenuItems?: (props: {
|
804
|
+
internalFilterOptions: MRT_InternalFilterOption[];
|
805
|
+
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
806
|
+
table: MRT_TableInstance<TData>;
|
807
|
+
}) => ReactNode[];
|
808
|
+
renderRowActionMenuItems?: (props: {
|
809
|
+
closeMenu: () => void;
|
810
|
+
row: MRT_Row<TData>;
|
811
|
+
table: MRT_TableInstance<TData>;
|
812
|
+
}) => ReactNode[];
|
813
|
+
renderRowActions?: (props: {
|
814
|
+
cell: MRT_Cell<TData>;
|
815
|
+
row: MRT_Row<TData>;
|
816
|
+
table: MRT_TableInstance<TData>;
|
817
|
+
}) => ReactNode;
|
818
|
+
renderToolbarAlertBannerContent?: (props: {
|
819
|
+
groupedAlert: ReactNode | null;
|
820
|
+
selectedAlert: ReactNode | null;
|
821
|
+
table: MRT_TableInstance<TData>;
|
822
|
+
}) => ReactNode;
|
823
|
+
renderToolbarInternalActions?: (props: {
|
824
|
+
table: MRT_TableInstance<TData>;
|
825
|
+
}) => ReactNode;
|
826
|
+
renderTopToolbar?: ((props: {
|
827
|
+
table: MRT_TableInstance<TData>;
|
828
|
+
}) => ReactNode) | ReactNode;
|
829
|
+
renderTopToolbarCustomActions?: (props: {
|
830
|
+
table: MRT_TableInstance<TData>;
|
831
|
+
}) => ReactNode;
|
832
|
+
rowCount?: number;
|
833
|
+
rowNumberDisplayMode?: 'original' | 'static';
|
834
|
+
rowPinningDisplayMode?: 'bottom' | 'select-bottom' | 'select-sticky' | 'select-top' | 'sticky' | 'top' | 'top-and-bottom';
|
835
|
+
rowVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableRowElement> | null>;
|
836
|
+
rowVirtualizerOptions?: ((props: {
|
837
|
+
table: MRT_TableInstance<TData>;
|
838
|
+
}) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>;
|
839
|
+
selectAllMode?: 'all' | 'page';
|
840
|
+
/**
|
841
|
+
* Manage state externally any way you want, then pass it back into MRT.
|
842
|
+
*/
|
843
|
+
state?: Partial<MRT_TableState<TData>>;
|
844
|
+
};
|