material-react-table 2.0.0-alpha.3 → 2.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +489 -435
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/icons.d.ts +4 -0
- package/dist/cjs/types/locales/hy.d.ts +2 -0
- package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +2 -2
- package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
- package/dist/cjs/types/types.d.ts +18 -7
- package/dist/esm/material-react-table.esm.js +457 -410
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/icons.d.ts +4 -0
- package/dist/esm/types/locales/hy.d.ts +2 -0
- package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +2 -2
- package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
- package/dist/esm/types/types.d.ts +18 -7
- package/dist/index.d.ts +25 -10
- package/locales/hy.d.ts +2 -0
- package/locales/hy.esm.d.ts +2 -0
- package/locales/hy.esm.js +93 -0
- package/locales/hy.esm.js.map +1 -0
- package/locales/hy.js +97 -0
- package/locales/hy.js.map +1 -0
- package/package.json +7 -7
- package/src/body/MRT_TableBody.tsx +13 -21
- package/src/body/MRT_TableBodyCell.tsx +2 -2
- package/src/body/MRT_TableBodyRow.tsx +3 -3
- package/src/body/MRT_TableDetailPanel.tsx +3 -3
- package/src/buttons/MRT_GrabHandleButton.tsx +1 -2
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +1 -2
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +1 -2
- package/src/buttons/MRT_ToggleFiltersButton.tsx +1 -2
- package/src/buttons/MRT_ToggleFullScreenButton.tsx +2 -3
- package/src/column.utils.ts +15 -9
- package/src/footer/MRT_TableFooter.tsx +1 -1
- package/src/footer/MRT_TableFooterCell.tsx +1 -1
- package/src/footer/MRT_TableFooterRow.tsx +2 -2
- package/src/head/MRT_TableHead.tsx +36 -14
- package/src/head/MRT_TableHeadCell.tsx +1 -1
- package/src/head/MRT_TableHeadRow.tsx +2 -2
- package/src/hooks/useMRT_Effects.ts +13 -2
- package/src/hooks/useMRT_TableOptions.ts +7 -2
- package/src/icons.ts +12 -0
- package/src/locales/hy.ts +93 -0
- package/src/table/MRT_Table.tsx +4 -2
- package/src/toolbar/MRT_TablePagination.tsx +135 -68
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +53 -15
- package/src/toolbar/MRT_TopToolbar.tsx +1 -1
- package/src/types.ts +22 -9
@@ -2,6 +2,8 @@ export interface MRT_Icons {
|
|
2
2
|
ArrowDownwardIcon: any;
|
3
3
|
ArrowRightIcon: any;
|
4
4
|
CancelIcon: any;
|
5
|
+
ChevronLeftIcon: any;
|
6
|
+
ChevronRightIcon: any;
|
5
7
|
ClearAllIcon: any;
|
6
8
|
CloseIcon: any;
|
7
9
|
DensityLargeIcon: any;
|
@@ -14,9 +16,11 @@ export interface MRT_Icons {
|
|
14
16
|
FilterAltIcon: any;
|
15
17
|
FilterListIcon: any;
|
16
18
|
FilterListOffIcon: any;
|
19
|
+
FirstPageIcon?: any;
|
17
20
|
FullscreenExitIcon: any;
|
18
21
|
FullscreenIcon: any;
|
19
22
|
KeyboardDoubleArrowDownIcon: any;
|
23
|
+
LastPageIcon?: any;
|
20
24
|
MoreHorizIcon: any;
|
21
25
|
MoreVertIcon: any;
|
22
26
|
PushPinIcon: any;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type MRT_TableInstance } from '../types';
|
2
|
-
interface Props<TData extends Record<string, any
|
2
|
+
interface Props<TData extends Record<string, any> = {}> {
|
3
3
|
position?: 'bottom' | 'top';
|
4
4
|
table: MRT_TableInstance<TData>;
|
5
5
|
}
|
6
|
-
export declare const MRT_TablePagination: <TData extends Record<string, any
|
6
|
+
export declare const MRT_TablePagination: <TData extends Record<string, any> = {}>({ position, table, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|
7
7
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type MRT_TableInstance } from '../types';
|
2
2
|
interface Props<TData extends Record<string, any>> {
|
3
|
-
stackAlertBanner
|
3
|
+
stackAlertBanner?: boolean;
|
4
4
|
table: MRT_TableInstance<TData>;
|
5
5
|
}
|
6
6
|
export declare const MRT_ToolbarAlertBanner: <TData extends Record<string, any>>({ stackAlertBanner, table, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import { type Dispatch, type MutableRefObject, type ReactNode, type RefObject, type SetStateAction } from 'react';
|
2
2
|
import { type AggregationFn, type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingInfoState, type ColumnSizingState, type DeepKeys, 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
3
|
import { type VirtualItem, type Virtualizer, type VirtualizerOptions } from '@tanstack/react-virtual';
|
4
|
-
import { type AutocompleteProps } from '@mui/material';
|
5
4
|
import { type AlertProps } from '@mui/material/Alert';
|
5
|
+
import { type AutocompleteProps } from '@mui/material/Autocomplete';
|
6
6
|
import { type ButtonProps } from '@mui/material/Button';
|
7
7
|
import { type CheckboxProps } from '@mui/material/Checkbox';
|
8
8
|
import { type ChipProps } from '@mui/material/Chip';
|
9
9
|
import { type DialogProps } from '@mui/material/Dialog';
|
10
10
|
import { type IconButtonProps } from '@mui/material/IconButton';
|
11
11
|
import { type LinearProgressProps } from '@mui/material/LinearProgress';
|
12
|
+
import { type PaginationProps } from '@mui/material/Pagination';
|
12
13
|
import { type PaperProps } from '@mui/material/Paper';
|
13
14
|
import { type RadioProps } from '@mui/material/Radio';
|
14
15
|
import { type SkeletonProps } from '@mui/material/Skeleton';
|
@@ -19,7 +20,6 @@ import { type TableCellProps } from '@mui/material/TableCell';
|
|
19
20
|
import { type TableContainerProps } from '@mui/material/TableContainer';
|
20
21
|
import { type TableFooterProps } from '@mui/material/TableFooter';
|
21
22
|
import { type TableHeadProps } from '@mui/material/TableHead';
|
22
|
-
import { type TablePaginationProps } from '@mui/material/TablePagination';
|
23
23
|
import { type TableRowProps } from '@mui/material/TableRow';
|
24
24
|
import { type TextFieldProps } from '@mui/material/TextField';
|
25
25
|
import { type ToolbarProps } from '@mui/material/Toolbar';
|
@@ -530,7 +530,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
530
530
|
/**
|
531
531
|
* 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
|
532
532
|
*/
|
533
|
-
layoutMode?: 'grid' | 'semantic';
|
533
|
+
layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
|
534
534
|
/**
|
535
535
|
* Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
|
536
536
|
*
|
@@ -613,6 +613,15 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
613
613
|
isTopToolbar: boolean;
|
614
614
|
table: MRT_TableInstance<TData>;
|
615
615
|
}) => LinearProgressProps) | LinearProgressProps;
|
616
|
+
muiPaginationProps?: ((props: {
|
617
|
+
table: MRT_TableInstance<TData>;
|
618
|
+
}) => Partial<PaginationProps & {
|
619
|
+
rowsPerPageOptions?: number[];
|
620
|
+
showRowsPerPage?: boolean;
|
621
|
+
}>) | Partial<PaginationProps & {
|
622
|
+
rowsPerPageOptions?: number[];
|
623
|
+
showRowsPerPage?: boolean;
|
624
|
+
}>;
|
616
625
|
muiRowDragHandleProps?: ((props: {
|
617
626
|
row: MRT_Row<TData>;
|
618
627
|
table: MRT_TableInstance<TData>;
|
@@ -673,9 +682,6 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
673
682
|
headerGroup: MRT_HeaderGroup<TData>;
|
674
683
|
table: MRT_TableInstance<TData>;
|
675
684
|
}) => TableRowProps) | TableRowProps;
|
676
|
-
muiTablePaginationProps?: ((props: {
|
677
|
-
table: MRT_TableInstance<TData>;
|
678
|
-
}) => Partial<Omit<TablePaginationProps, 'rowsPerPage'>>) | Partial<Omit<TablePaginationProps, 'rowsPerPage'>>;
|
679
685
|
muiTablePaperProps?: ((props: {
|
680
686
|
table: MRT_TableInstance<TData>;
|
681
687
|
}) => PaperProps) | PaperProps;
|
@@ -737,7 +743,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
737
743
|
positionExpandColumn?: 'first' | 'last';
|
738
744
|
positionGlobalFilter?: 'left' | 'none' | 'right';
|
739
745
|
positionPagination?: 'both' | 'bottom' | 'none' | 'top';
|
740
|
-
positionToolbarAlertBanner?: 'bottom' | 'none' | 'top';
|
746
|
+
positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
|
741
747
|
positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
|
742
748
|
renderBottomToolbar?: ((props: {
|
743
749
|
table: MRT_TableInstance<TData>;
|
@@ -789,6 +795,11 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
789
795
|
row: MRT_Row<TData>;
|
790
796
|
table: MRT_TableInstance<TData>;
|
791
797
|
}) => ReactNode;
|
798
|
+
renderToolbarAlertBannerContent?: (props: {
|
799
|
+
groupedAlert: ReactNode | null;
|
800
|
+
selectedAlert: ReactNode | null;
|
801
|
+
table: MRT_TableInstance<TData>;
|
802
|
+
}) => ReactNode;
|
792
803
|
renderToolbarInternalActions?: (props: {
|
793
804
|
table: MRT_TableInstance<TData>;
|
794
805
|
}) => ReactNode;
|
package/dist/index.d.ts
CHANGED
@@ -5,14 +5,15 @@ import { Row, Table, TableState, ColumnDef, DeepKeys, Column, Header, HeaderGrou
|
|
5
5
|
export { 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, VisibilityState as MRT_VisibilityState } from '@tanstack/react-table';
|
6
6
|
import { Virtualizer, VirtualizerOptions, VirtualItem } from '@tanstack/react-virtual';
|
7
7
|
export { VirtualItem as MRT_VirtualItem, Virtualizer as MRT_Virtualizer, VirtualizerOptions as MRT_VirtualizerOptions } from '@tanstack/react-virtual';
|
8
|
-
import { AutocompleteProps } from '@mui/material';
|
9
8
|
import { AlertProps } from '@mui/material/Alert';
|
9
|
+
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
10
10
|
import { ButtonProps } from '@mui/material/Button';
|
11
11
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
12
12
|
import { ChipProps } from '@mui/material/Chip';
|
13
13
|
import { DialogProps } from '@mui/material/Dialog';
|
14
14
|
import { IconButtonProps } from '@mui/material/IconButton';
|
15
15
|
import { LinearProgressProps } from '@mui/material/LinearProgress';
|
16
|
+
import { PaginationProps } from '@mui/material/Pagination';
|
16
17
|
import { PaperProps } from '@mui/material/Paper';
|
17
18
|
import { RadioProps } from '@mui/material/Radio';
|
18
19
|
import { SkeletonProps } from '@mui/material/Skeleton';
|
@@ -23,7 +24,6 @@ import { TableCellProps } from '@mui/material/TableCell';
|
|
23
24
|
import { TableContainerProps } from '@mui/material/TableContainer';
|
24
25
|
import { TableFooterProps } from '@mui/material/TableFooter';
|
25
26
|
import { TableHeadProps } from '@mui/material/TableHead';
|
26
|
-
import { TablePaginationProps } from '@mui/material/TablePagination';
|
27
27
|
import { TableRowProps } from '@mui/material/TableRow';
|
28
28
|
import { TextFieldProps } from '@mui/material/TextField';
|
29
29
|
import { ToolbarProps } from '@mui/material/Toolbar';
|
@@ -115,6 +115,8 @@ interface MRT_Icons {
|
|
115
115
|
ArrowDownwardIcon: any;
|
116
116
|
ArrowRightIcon: any;
|
117
117
|
CancelIcon: any;
|
118
|
+
ChevronLeftIcon: any;
|
119
|
+
ChevronRightIcon: any;
|
118
120
|
ClearAllIcon: any;
|
119
121
|
CloseIcon: any;
|
120
122
|
DensityLargeIcon: any;
|
@@ -127,9 +129,11 @@ interface MRT_Icons {
|
|
127
129
|
FilterAltIcon: any;
|
128
130
|
FilterListIcon: any;
|
129
131
|
FilterListOffIcon: any;
|
132
|
+
FirstPageIcon?: any;
|
130
133
|
FullscreenExitIcon: any;
|
131
134
|
FullscreenIcon: any;
|
132
135
|
KeyboardDoubleArrowDownIcon: any;
|
136
|
+
LastPageIcon?: any;
|
133
137
|
MoreHorizIcon: any;
|
134
138
|
MoreVertIcon: any;
|
135
139
|
PushPinIcon: any;
|
@@ -654,7 +658,7 @@ type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<TableOpt
|
|
654
658
|
/**
|
655
659
|
* 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
|
656
660
|
*/
|
657
|
-
layoutMode?: 'grid' | 'semantic';
|
661
|
+
layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
|
658
662
|
/**
|
659
663
|
* Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
|
660
664
|
*
|
@@ -737,6 +741,15 @@ type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<TableOpt
|
|
737
741
|
isTopToolbar: boolean;
|
738
742
|
table: MRT_TableInstance<TData>;
|
739
743
|
}) => LinearProgressProps) | LinearProgressProps;
|
744
|
+
muiPaginationProps?: ((props: {
|
745
|
+
table: MRT_TableInstance<TData>;
|
746
|
+
}) => Partial<PaginationProps & {
|
747
|
+
rowsPerPageOptions?: number[];
|
748
|
+
showRowsPerPage?: boolean;
|
749
|
+
}>) | Partial<PaginationProps & {
|
750
|
+
rowsPerPageOptions?: number[];
|
751
|
+
showRowsPerPage?: boolean;
|
752
|
+
}>;
|
740
753
|
muiRowDragHandleProps?: ((props: {
|
741
754
|
row: MRT_Row<TData>;
|
742
755
|
table: MRT_TableInstance<TData>;
|
@@ -797,9 +810,6 @@ type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<TableOpt
|
|
797
810
|
headerGroup: MRT_HeaderGroup<TData>;
|
798
811
|
table: MRT_TableInstance<TData>;
|
799
812
|
}) => TableRowProps) | TableRowProps;
|
800
|
-
muiTablePaginationProps?: ((props: {
|
801
|
-
table: MRT_TableInstance<TData>;
|
802
|
-
}) => Partial<Omit<TablePaginationProps, 'rowsPerPage'>>) | Partial<Omit<TablePaginationProps, 'rowsPerPage'>>;
|
803
813
|
muiTablePaperProps?: ((props: {
|
804
814
|
table: MRT_TableInstance<TData>;
|
805
815
|
}) => PaperProps) | PaperProps;
|
@@ -861,7 +871,7 @@ type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<TableOpt
|
|
861
871
|
positionExpandColumn?: 'first' | 'last';
|
862
872
|
positionGlobalFilter?: 'left' | 'none' | 'right';
|
863
873
|
positionPagination?: 'both' | 'bottom' | 'none' | 'top';
|
864
|
-
positionToolbarAlertBanner?: 'bottom' | 'none' | 'top';
|
874
|
+
positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
|
865
875
|
positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
|
866
876
|
renderBottomToolbar?: ((props: {
|
867
877
|
table: MRT_TableInstance<TData>;
|
@@ -913,6 +923,11 @@ type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<TableOpt
|
|
913
923
|
row: MRT_Row<TData>;
|
914
924
|
table: MRT_TableInstance<TData>;
|
915
925
|
}) => ReactNode;
|
926
|
+
renderToolbarAlertBannerContent?: (props: {
|
927
|
+
groupedAlert: ReactNode | null;
|
928
|
+
selectedAlert: ReactNode | null;
|
929
|
+
table: MRT_TableInstance<TData>;
|
930
|
+
}) => ReactNode;
|
916
931
|
renderToolbarInternalActions?: (props: {
|
917
932
|
table: MRT_TableInstance<TData>;
|
918
933
|
}) => ReactNode;
|
@@ -1440,14 +1455,14 @@ interface Props$5<TData extends Record<string, any>> {
|
|
1440
1455
|
}
|
1441
1456
|
declare const MRT_LinearProgressBar: <TData extends Record<string, any>>({ isTopToolbar, table, }: Props$5<TData>) => react_jsx_runtime.JSX.Element;
|
1442
1457
|
|
1443
|
-
interface Props$4<TData extends Record<string, any
|
1458
|
+
interface Props$4<TData extends Record<string, any> = {}> {
|
1444
1459
|
position?: 'bottom' | 'top';
|
1445
1460
|
table: MRT_TableInstance<TData>;
|
1446
1461
|
}
|
1447
|
-
declare const MRT_TablePagination: <TData extends Record<string, any
|
1462
|
+
declare const MRT_TablePagination: <TData extends Record<string, any> = {}>({ position, table, }: Props$4<TData>) => react_jsx_runtime.JSX.Element;
|
1448
1463
|
|
1449
1464
|
interface Props$3<TData extends Record<string, any>> {
|
1450
|
-
stackAlertBanner
|
1465
|
+
stackAlertBanner?: boolean;
|
1451
1466
|
table: MRT_TableInstance<TData>;
|
1452
1467
|
}
|
1453
1468
|
declare const MRT_ToolbarAlertBanner: <TData extends Record<string, any>>({ stackAlertBanner, table, }: Props$3<TData>) => react_jsx_runtime.JSX.Element;
|
package/locales/hy.d.ts
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
const MRT_Localization_HY = {
|
2
|
+
actions: 'Գործողություններ',
|
3
|
+
and: 'և',
|
4
|
+
cancel: 'Չեղարկել',
|
5
|
+
changeFilterMode: 'Փոխել զտիչի ռեժիմը',
|
6
|
+
changeSearchMode: 'Փոխել որոնման ռեժիմը',
|
7
|
+
clearFilter: 'Մաքրել զտիչը',
|
8
|
+
clearSearch: 'Մաքրել որոնումը',
|
9
|
+
clearSort: 'Մաքրել տեսակավորումը',
|
10
|
+
clickToCopy: 'Սեղմել պատճենելու համար',
|
11
|
+
columnActions: 'Սյունակի գործողություն',
|
12
|
+
copiedToClipboard: 'Պատճենվել է փոխանակման բուֆերում',
|
13
|
+
collapse: 'Փոքրացնել',
|
14
|
+
collapseAll: 'Փոքրացնել բոլորը',
|
15
|
+
dropToGroupBy: 'Ավելացնել խմբին {column}',
|
16
|
+
edit: 'Խմբագրել',
|
17
|
+
expand: 'Բացել',
|
18
|
+
expandAll: 'Բացել բոլորը',
|
19
|
+
filterArrIncludes: 'Միացնել',
|
20
|
+
filterArrIncludesAll: 'Միացնել բոլորը',
|
21
|
+
filterArrIncludesSome: 'Միացնել',
|
22
|
+
filterBetween: 'Միջև',
|
23
|
+
filterBetweenInclusive: 'Միջև ներառյալ',
|
24
|
+
filterByColumn: 'Զտել ըստ {column}',
|
25
|
+
filterContains: 'Պարունակում է',
|
26
|
+
filterEmpty: 'Դատարկ է',
|
27
|
+
filterEndsWith: 'Ավարտվում է',
|
28
|
+
filterEquals: 'Հավասար են',
|
29
|
+
filterEqualsString: 'Հավասար են',
|
30
|
+
filterFuzzy: 'Ֆազզի',
|
31
|
+
filterGreaterThan: 'Ավել է քան',
|
32
|
+
filterGreaterThanOrEqualTo: 'Ավել է կամ հավասար է',
|
33
|
+
filterInNumberRange: 'Միջև',
|
34
|
+
filterIncludesString: 'Պարունակում է',
|
35
|
+
filterIncludesStringSensitive: 'Պարունակում է (գրանցումից կախված է)',
|
36
|
+
filterLessThan: 'Փոքր է քան',
|
37
|
+
filterLessThanOrEqualTo: 'Զտիչի ռեժիմ',
|
38
|
+
filterMode: 'Զտիչի ռեժիմ: {filterType}',
|
39
|
+
filterNotEmpty: 'Դատարկ չէ',
|
40
|
+
filterNotEquals: 'Հավասար չեն',
|
41
|
+
filterStartsWith: 'Սկսվում է ...-ից',
|
42
|
+
filterWeakEquals: 'Հավասար են',
|
43
|
+
filteringByColumn: 'Զտիչը ըստ {column} - {filterType} {filterValue}',
|
44
|
+
goToFirstPage: 'Անցնել առաջին էջ',
|
45
|
+
goToLastPage: 'Անցնել վերջին էջ',
|
46
|
+
goToNextPage: 'Անցնել հաջորդ էջ',
|
47
|
+
goToPreviousPage: 'Անցնել նախորդ էջ',
|
48
|
+
grab: 'Տեղաշարժել',
|
49
|
+
groupByColumn: 'Խմբավորել ըստ {column}',
|
50
|
+
groupedBy: 'Խմբավորել',
|
51
|
+
hideAll: 'Թաքցնել բոլորը',
|
52
|
+
hideColumn: 'Թաքցնել {column} սյունակը',
|
53
|
+
max: 'Առվ',
|
54
|
+
min: 'Նվզ',
|
55
|
+
move: 'Շարժել',
|
56
|
+
noRecordsToDisplay: 'Ցուցադրման համար գրառումներ չկան',
|
57
|
+
noResultsFound: 'Արդյունքներ չեն գտնվել',
|
58
|
+
of: '-ից',
|
59
|
+
or: 'կամ',
|
60
|
+
pinToLeft: 'Կցել ձախից',
|
61
|
+
pinToRight: 'Կցել աջից',
|
62
|
+
resetColumnSize: 'Չեղարկել սյունակի չափը',
|
63
|
+
resetOrder: 'Չեղարկել կարգը',
|
64
|
+
rowActions: 'Տողի գործողությունները',
|
65
|
+
rowNumber: '#',
|
66
|
+
rowNumbers: 'Տողերի քանակը',
|
67
|
+
rowsPerPage: 'Տողեր էջում',
|
68
|
+
save: 'Պահպանել',
|
69
|
+
search: 'Գտնել',
|
70
|
+
selectedCountOfRowCountRowsSelected: '{rowCount} տողից ընտրված է {selectedCount}',
|
71
|
+
select: 'Ընտրել',
|
72
|
+
showAll: 'Ցույց տալ բոլորը',
|
73
|
+
showAllColumns: 'Ցույց տալ բոլոր սյունակները',
|
74
|
+
showHideColumns: 'Ցույց տալ/թաքցնել սյունակները',
|
75
|
+
showHideFilters: 'Ցույց տալ/թաքցնել զտիչները',
|
76
|
+
showHideSearch: 'Ցույց տալ/թաքցնել որոնումը',
|
77
|
+
sortByColumnAsc: 'Տեսակավորել {column} ըստ աճման',
|
78
|
+
sortByColumnDesc: 'Տեսակավորել {column} ըստ նվազման',
|
79
|
+
sortedByColumnAsc: 'Տեսակավորված է ըստ {column} աճման',
|
80
|
+
sortedByColumnDesc: 'Տեսակավորված է ըստ {column} նվազման',
|
81
|
+
thenBy: ', այնուհետ ',
|
82
|
+
toggleDensity: 'Փոխել խտությունը',
|
83
|
+
toggleFullScreen: 'Միացնել ամբողջ էկրանով ռեժիմը',
|
84
|
+
toggleSelectAll: 'Ընտրել բոլորը',
|
85
|
+
toggleSelectRow: 'Փոխել տողի ընտրությունը',
|
86
|
+
toggleVisibility: 'Փոխել տեսանելիությունը',
|
87
|
+
ungroupByColumn: 'Խմբավորել ըստ {column}',
|
88
|
+
unpin: 'Ապակցել',
|
89
|
+
unpinAll: 'Ապակցել բոլորը',
|
90
|
+
};
|
91
|
+
|
92
|
+
export { MRT_Localization_HY };
|
93
|
+
//# sourceMappingURL=hy.esm.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hy.esm.js","sources":["../src/locales/hy.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,mBAAmB,GAAqB;AACnD,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,GAAG,EAAE,GAAG;AACR,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,gBAAgB,EAAE,oBAAoB;AACtC,IAAA,gBAAgB,EAAE,sBAAsB;AACxC,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,SAAS,EAAE,sBAAsB;AACjC,IAAA,WAAW,EAAE,yBAAyB;AACtC,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,iBAAiB,EAAE,kCAAkC;AACrD,IAAA,QAAQ,EAAE,WAAW;AACrB,IAAA,WAAW,EAAE,kBAAkB;AAC/B,IAAA,aAAa,EAAE,0BAA0B;AACzC,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,iBAAiB,EAAE,SAAS;AAC5B,IAAA,oBAAoB,EAAE,gBAAgB;AACtC,IAAA,qBAAqB,EAAE,SAAS;AAChC,IAAA,aAAa,EAAE,MAAM;AAC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EAAE,WAAW;AACvB,IAAA,eAAe,EAAE,wBAAwB;AACzC,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,UAAU,EAAE,wBAAwB;AACpC,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,UAAU,EAAE,eAAe;AAC3B,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,mCAAmC,EACjC,4CAA4C;AAC9C,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,cAAc,EAAE,6BAA6B;AAC7C,IAAA,eAAe,EAAE,+BAA+B;AAChD,IAAA,eAAe,EAAE,4BAA4B;AAC7C,IAAA,cAAc,EAAE,4BAA4B;AAC5C,IAAA,eAAe,EAAE,gCAAgC;AACjD,IAAA,gBAAgB,EAAE,kCAAkC;AACpD,IAAA,iBAAiB,EAAE,mCAAmC;AACtD,IAAA,kBAAkB,EAAE,qCAAqC;AACzD,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,aAAa,EAAE,kBAAkB;AACjC,IAAA,gBAAgB,EAAE,+BAA+B;AACjD,IAAA,eAAe,EAAE,eAAe;AAChC,IAAA,eAAe,EAAE,yBAAyB;AAC1C,IAAA,gBAAgB,EAAE,wBAAwB;AAC1C,IAAA,eAAe,EAAE,wBAAwB;AACzC,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,QAAQ,EAAE,gBAAgB;;;;;"}
|
package/locales/hy.js
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const MRT_Localization_HY = {
|
6
|
+
actions: 'Գործողություններ',
|
7
|
+
and: 'և',
|
8
|
+
cancel: 'Չեղարկել',
|
9
|
+
changeFilterMode: 'Փոխել զտիչի ռեժիմը',
|
10
|
+
changeSearchMode: 'Փոխել որոնման ռեժիմը',
|
11
|
+
clearFilter: 'Մաքրել զտիչը',
|
12
|
+
clearSearch: 'Մաքրել որոնումը',
|
13
|
+
clearSort: 'Մաքրել տեսակավորումը',
|
14
|
+
clickToCopy: 'Սեղմել պատճենելու համար',
|
15
|
+
columnActions: 'Սյունակի գործողություն',
|
16
|
+
copiedToClipboard: 'Պատճենվել է փոխանակման բուֆերում',
|
17
|
+
collapse: 'Փոքրացնել',
|
18
|
+
collapseAll: 'Փոքրացնել բոլորը',
|
19
|
+
dropToGroupBy: 'Ավելացնել խմբին {column}',
|
20
|
+
edit: 'Խմբագրել',
|
21
|
+
expand: 'Բացել',
|
22
|
+
expandAll: 'Բացել բոլորը',
|
23
|
+
filterArrIncludes: 'Միացնել',
|
24
|
+
filterArrIncludesAll: 'Միացնել բոլորը',
|
25
|
+
filterArrIncludesSome: 'Միացնել',
|
26
|
+
filterBetween: 'Միջև',
|
27
|
+
filterBetweenInclusive: 'Միջև ներառյալ',
|
28
|
+
filterByColumn: 'Զտել ըստ {column}',
|
29
|
+
filterContains: 'Պարունակում է',
|
30
|
+
filterEmpty: 'Դատարկ է',
|
31
|
+
filterEndsWith: 'Ավարտվում է',
|
32
|
+
filterEquals: 'Հավասար են',
|
33
|
+
filterEqualsString: 'Հավասար են',
|
34
|
+
filterFuzzy: 'Ֆազզի',
|
35
|
+
filterGreaterThan: 'Ավել է քան',
|
36
|
+
filterGreaterThanOrEqualTo: 'Ավել է կամ հավասար է',
|
37
|
+
filterInNumberRange: 'Միջև',
|
38
|
+
filterIncludesString: 'Պարունակում է',
|
39
|
+
filterIncludesStringSensitive: 'Պարունակում է (գրանցումից կախված է)',
|
40
|
+
filterLessThan: 'Փոքր է քան',
|
41
|
+
filterLessThanOrEqualTo: 'Զտիչի ռեժիմ',
|
42
|
+
filterMode: 'Զտիչի ռեժիմ: {filterType}',
|
43
|
+
filterNotEmpty: 'Դատարկ չէ',
|
44
|
+
filterNotEquals: 'Հավասար չեն',
|
45
|
+
filterStartsWith: 'Սկսվում է ...-ից',
|
46
|
+
filterWeakEquals: 'Հավասար են',
|
47
|
+
filteringByColumn: 'Զտիչը ըստ {column} - {filterType} {filterValue}',
|
48
|
+
goToFirstPage: 'Անցնել առաջին էջ',
|
49
|
+
goToLastPage: 'Անցնել վերջին էջ',
|
50
|
+
goToNextPage: 'Անցնել հաջորդ էջ',
|
51
|
+
goToPreviousPage: 'Անցնել նախորդ էջ',
|
52
|
+
grab: 'Տեղաշարժել',
|
53
|
+
groupByColumn: 'Խմբավորել ըստ {column}',
|
54
|
+
groupedBy: 'Խմբավորել',
|
55
|
+
hideAll: 'Թաքցնել բոլորը',
|
56
|
+
hideColumn: 'Թաքցնել {column} սյունակը',
|
57
|
+
max: 'Առվ',
|
58
|
+
min: 'Նվզ',
|
59
|
+
move: 'Շարժել',
|
60
|
+
noRecordsToDisplay: 'Ցուցադրման համար գրառումներ չկան',
|
61
|
+
noResultsFound: 'Արդյունքներ չեն գտնվել',
|
62
|
+
of: '-ից',
|
63
|
+
or: 'կամ',
|
64
|
+
pinToLeft: 'Կցել ձախից',
|
65
|
+
pinToRight: 'Կցել աջից',
|
66
|
+
resetColumnSize: 'Չեղարկել սյունակի չափը',
|
67
|
+
resetOrder: 'Չեղարկել կարգը',
|
68
|
+
rowActions: 'Տողի գործողությունները',
|
69
|
+
rowNumber: '#',
|
70
|
+
rowNumbers: 'Տողերի քանակը',
|
71
|
+
rowsPerPage: 'Տողեր էջում',
|
72
|
+
save: 'Պահպանել',
|
73
|
+
search: 'Գտնել',
|
74
|
+
selectedCountOfRowCountRowsSelected: '{rowCount} տողից ընտրված է {selectedCount}',
|
75
|
+
select: 'Ընտրել',
|
76
|
+
showAll: 'Ցույց տալ բոլորը',
|
77
|
+
showAllColumns: 'Ցույց տալ բոլոր սյունակները',
|
78
|
+
showHideColumns: 'Ցույց տալ/թաքցնել սյունակները',
|
79
|
+
showHideFilters: 'Ցույց տալ/թաքցնել զտիչները',
|
80
|
+
showHideSearch: 'Ցույց տալ/թաքցնել որոնումը',
|
81
|
+
sortByColumnAsc: 'Տեսակավորել {column} ըստ աճման',
|
82
|
+
sortByColumnDesc: 'Տեսակավորել {column} ըստ նվազման',
|
83
|
+
sortedByColumnAsc: 'Տեսակավորված է ըստ {column} աճման',
|
84
|
+
sortedByColumnDesc: 'Տեսակավորված է ըստ {column} նվազման',
|
85
|
+
thenBy: ', այնուհետ ',
|
86
|
+
toggleDensity: 'Փոխել խտությունը',
|
87
|
+
toggleFullScreen: 'Միացնել ամբողջ էկրանով ռեժիմը',
|
88
|
+
toggleSelectAll: 'Ընտրել բոլորը',
|
89
|
+
toggleSelectRow: 'Փոխել տողի ընտրությունը',
|
90
|
+
toggleVisibility: 'Փոխել տեսանելիությունը',
|
91
|
+
ungroupByColumn: 'Խմբավորել ըստ {column}',
|
92
|
+
unpin: 'Ապակցել',
|
93
|
+
unpinAll: 'Ապակցել բոլորը',
|
94
|
+
};
|
95
|
+
|
96
|
+
exports.MRT_Localization_HY = MRT_Localization_HY;
|
97
|
+
//# sourceMappingURL=hy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hy.js","sources":["../src/locales/hy.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAEa,MAAA,mBAAmB,GAAqB;AACnD,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,GAAG,EAAE,GAAG;AACR,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,gBAAgB,EAAE,oBAAoB;AACtC,IAAA,gBAAgB,EAAE,sBAAsB;AACxC,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,SAAS,EAAE,sBAAsB;AACjC,IAAA,WAAW,EAAE,yBAAyB;AACtC,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,iBAAiB,EAAE,kCAAkC;AACrD,IAAA,QAAQ,EAAE,WAAW;AACrB,IAAA,WAAW,EAAE,kBAAkB;AAC/B,IAAA,aAAa,EAAE,0BAA0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alpha.
|
2
|
+
"version": "2.0.0-alpha.5",
|
3
3
|
"license": "MIT",
|
4
4
|
"name": "material-react-table",
|
5
5
|
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
|
@@ -81,13 +81,13 @@
|
|
81
81
|
"@storybook/react": "^7.4.6",
|
82
82
|
"@storybook/react-vite": "^7.4.6",
|
83
83
|
"@storybook/testing-library": "^0.2.2",
|
84
|
-
"@types/node": "^20.8.
|
84
|
+
"@types/node": "^20.8.3",
|
85
85
|
"@types/react": "^18.2.25",
|
86
|
-
"@types/react-dom": "^18.2.
|
86
|
+
"@types/react-dom": "^18.2.11",
|
87
87
|
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
88
88
|
"@typescript-eslint/parser": "^6.7.4",
|
89
89
|
"@vitejs/plugin-react": "^4.1.0",
|
90
|
-
"eslint": "^8.
|
90
|
+
"eslint": "^8.51.0",
|
91
91
|
"eslint-plugin-mui-path-imports": "^0.0.15",
|
92
92
|
"eslint-plugin-perfectionist": "^2.1.0",
|
93
93
|
"prop-types": "^15.8.1",
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"react-is": "^18.2.0",
|
97
97
|
"rollup": "^2.79.1",
|
98
98
|
"rollup-plugin-copy": "^3.5.0",
|
99
|
-
"rollup-plugin-dts": "^6.0
|
99
|
+
"rollup-plugin-dts": "^6.1.0",
|
100
100
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
101
101
|
"size-limit": "^9.0.0",
|
102
102
|
"storybook": "^7.4.6",
|
@@ -116,8 +116,8 @@
|
|
116
116
|
},
|
117
117
|
"dependencies": {
|
118
118
|
"@tanstack/match-sorter-utils": "8.8.4",
|
119
|
-
"@tanstack/react-table": "8.10.
|
120
|
-
"@tanstack/react-virtual": "3.0.0-beta.
|
119
|
+
"@tanstack/react-table": "8.10.6",
|
120
|
+
"@tanstack/react-virtual": "3.0.0-beta.65",
|
121
121
|
"highlight-words": "1.2.2"
|
122
122
|
}
|
123
123
|
}
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
import TableBody from '@mui/material/TableBody';
|
8
8
|
import Typography from '@mui/material/Typography';
|
9
9
|
import { MRT_TableBodyRow, Memo_MRT_TableBodyRow } from './MRT_TableBodyRow';
|
10
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
10
|
+
import { getCanRankRows, parseFromValuesOrFunc } from '../column.utils';
|
11
11
|
import { rankGlobalFuzzy } from '../sortingFns';
|
12
12
|
import { type MRT_Row, type MRT_TableInstance } from '../types';
|
13
13
|
|
@@ -62,7 +62,6 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
62
62
|
density,
|
63
63
|
expanded,
|
64
64
|
globalFilter,
|
65
|
-
globalFilterFn,
|
66
65
|
isFullScreen,
|
67
66
|
pagination,
|
68
67
|
rowPinning,
|
@@ -81,18 +80,11 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
81
80
|
const tableFooterHeight =
|
82
81
|
(enableStickyFooter && tableFooterRef.current?.clientHeight) || 0;
|
83
82
|
|
84
|
-
const
|
83
|
+
const shouldRankRows = useMemo(
|
85
84
|
() =>
|
86
|
-
|
87
|
-
!manualFiltering &&
|
88
|
-
!manualGrouping &&
|
89
|
-
!manualSorting &&
|
90
|
-
enableGlobalFilterRankedResults &&
|
91
|
-
globalFilter &&
|
92
|
-
globalFilterFn === 'fuzzy' &&
|
93
|
-
expanded !== true &&
|
85
|
+
getCanRankRows(table) &&
|
94
86
|
!Object.values(sorting).some(Boolean) &&
|
95
|
-
|
87
|
+
globalFilter,
|
96
88
|
[
|
97
89
|
enableGlobalFilterRankedResults,
|
98
90
|
expanded,
|
@@ -114,8 +106,8 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
114
106
|
);
|
115
107
|
|
116
108
|
const rows = useMemo(() => {
|
117
|
-
let rows = [];
|
118
|
-
if (!
|
109
|
+
let rows: MRT_Row<TData>[] = [];
|
110
|
+
if (!shouldRankRows) {
|
119
111
|
rows =
|
120
112
|
!enableRowPinning || rowPinningDisplayMode?.includes('sticky')
|
121
113
|
? getRowModel().rows
|
@@ -139,8 +131,8 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
139
131
|
|
140
132
|
return rows;
|
141
133
|
}, [
|
142
|
-
|
143
|
-
|
134
|
+
shouldRankRows,
|
135
|
+
shouldRankRows ? getPrePaginationRowModel().rows : getRowModel().rows,
|
144
136
|
pagination.pageIndex,
|
145
137
|
pagination.pageSize,
|
146
138
|
rowPinning,
|
@@ -179,7 +171,7 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
179
171
|
<TableBody
|
180
172
|
{...tableBodyProps}
|
181
173
|
sx={(theme) => ({
|
182
|
-
display: layoutMode
|
174
|
+
display: layoutMode?.startsWith('grid') ? 'grid' : undefined,
|
183
175
|
position: 'sticky',
|
184
176
|
top: tableHeadHeight - 1,
|
185
177
|
zIndex: 1,
|
@@ -209,7 +201,7 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
209
201
|
<TableBody
|
210
202
|
{...tableBodyProps}
|
211
203
|
sx={(theme) => ({
|
212
|
-
display: layoutMode
|
204
|
+
display: layoutMode?.startsWith('grid') ? 'grid' : undefined,
|
213
205
|
height: rowVirtualizer
|
214
206
|
? `${rowVirtualizer.getTotalSize()}px`
|
215
207
|
: 'inherit',
|
@@ -221,12 +213,12 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
221
213
|
{tableBodyProps?.children ??
|
222
214
|
(!rows.length ? (
|
223
215
|
<tr
|
224
|
-
style={{ display: layoutMode
|
216
|
+
style={{ display: layoutMode?.startsWith('grid') ? 'grid' : undefined }}
|
225
217
|
>
|
226
218
|
<td
|
227
219
|
colSpan={table.getVisibleLeafColumns().length}
|
228
220
|
style={{
|
229
|
-
display: layoutMode
|
221
|
+
display: layoutMode?.startsWith('grid') ? 'grid' : 'table-cell',
|
230
222
|
}}
|
231
223
|
>
|
232
224
|
{renderEmptyRowsFallback?.({ table }) ?? (
|
@@ -285,7 +277,7 @@ export const MRT_TableBody = <TData extends Record<string, any>>({
|
|
285
277
|
{...tableBodyProps}
|
286
278
|
sx={(theme) => ({
|
287
279
|
bottom: tableFooterHeight - 1,
|
288
|
-
display: layoutMode
|
280
|
+
display: layoutMode?.startsWith('grid') ? 'grid' : undefined,
|
289
281
|
position: 'sticky',
|
290
282
|
zIndex: 1,
|
291
283
|
...(parseFromValuesOrFunc(tableBodyProps?.sx, theme) as any),
|
@@ -210,11 +210,11 @@ export const MRT_TableBodyCell = <TData extends Record<string, any>>({
|
|
210
210
|
outlineOffset: '-1px',
|
211
211
|
textOverflow: 'clip',
|
212
212
|
},
|
213
|
-
alignItems: layoutMode
|
213
|
+
alignItems: layoutMode?.startsWith('grid') ? 'center' : undefined,
|
214
214
|
cursor:
|
215
215
|
isEditable && editDisplayMode === 'cell' ? 'pointer' : 'inherit',
|
216
216
|
justifyContent:
|
217
|
-
layoutMode
|
217
|
+
layoutMode?.startsWith('grid') ? tableCellProps.align : undefined,
|
218
218
|
overflow: 'hidden',
|
219
219
|
p:
|
220
220
|
density === 'compact'
|
@@ -145,7 +145,7 @@ export const MRT_TableBodyRow = <TData extends Record<string, any>>({
|
|
145
145
|
},
|
146
146
|
backgroundColor: `${lighten(
|
147
147
|
theme.palette.background.default,
|
148
|
-
0.
|
148
|
+
0.05,
|
149
149
|
)} !important`,
|
150
150
|
bottom:
|
151
151
|
!virtualRow && bottomPinnedIndex !== undefined && isPinned
|
@@ -155,7 +155,7 @@ export const MRT_TableBodyRow = <TData extends Record<string, any>>({
|
|
155
155
|
}px`
|
156
156
|
: undefined,
|
157
157
|
boxSizing: 'border-box',
|
158
|
-
display: layoutMode
|
158
|
+
display: layoutMode?.startsWith('grid') ? 'flex' : undefined,
|
159
159
|
opacity: isPinned
|
160
160
|
? 0.98
|
161
161
|
: draggingRow?.id === row.id || hoveredRow?.id === row.id
|
@@ -185,7 +185,7 @@ export const MRT_TableBodyRow = <TData extends Record<string, any>>({
|
|
185
185
|
width: '100%',
|
186
186
|
zIndex:
|
187
187
|
rowPinningDisplayMode?.includes('sticky') && isPinned
|
188
|
-
?
|
188
|
+
? 2
|
189
189
|
: undefined,
|
190
190
|
...(sx as any),
|
191
191
|
})}
|