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.
Files changed (47) hide show
  1. package/dist/cjs/index.js +489 -435
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/icons.d.ts +4 -0
  4. package/dist/cjs/types/locales/hy.d.ts +2 -0
  5. package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +2 -2
  6. package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
  7. package/dist/cjs/types/types.d.ts +18 -7
  8. package/dist/esm/material-react-table.esm.js +457 -410
  9. package/dist/esm/material-react-table.esm.js.map +1 -1
  10. package/dist/esm/types/icons.d.ts +4 -0
  11. package/dist/esm/types/locales/hy.d.ts +2 -0
  12. package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +2 -2
  13. package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
  14. package/dist/esm/types/types.d.ts +18 -7
  15. package/dist/index.d.ts +25 -10
  16. package/locales/hy.d.ts +2 -0
  17. package/locales/hy.esm.d.ts +2 -0
  18. package/locales/hy.esm.js +93 -0
  19. package/locales/hy.esm.js.map +1 -0
  20. package/locales/hy.js +97 -0
  21. package/locales/hy.js.map +1 -0
  22. package/package.json +7 -7
  23. package/src/body/MRT_TableBody.tsx +13 -21
  24. package/src/body/MRT_TableBodyCell.tsx +2 -2
  25. package/src/body/MRT_TableBodyRow.tsx +3 -3
  26. package/src/body/MRT_TableDetailPanel.tsx +3 -3
  27. package/src/buttons/MRT_GrabHandleButton.tsx +1 -2
  28. package/src/buttons/MRT_ShowHideColumnsButton.tsx +1 -2
  29. package/src/buttons/MRT_ToggleDensePaddingButton.tsx +1 -2
  30. package/src/buttons/MRT_ToggleFiltersButton.tsx +1 -2
  31. package/src/buttons/MRT_ToggleFullScreenButton.tsx +2 -3
  32. package/src/column.utils.ts +15 -9
  33. package/src/footer/MRT_TableFooter.tsx +1 -1
  34. package/src/footer/MRT_TableFooterCell.tsx +1 -1
  35. package/src/footer/MRT_TableFooterRow.tsx +2 -2
  36. package/src/head/MRT_TableHead.tsx +36 -14
  37. package/src/head/MRT_TableHeadCell.tsx +1 -1
  38. package/src/head/MRT_TableHeadRow.tsx +2 -2
  39. package/src/hooks/useMRT_Effects.ts +13 -2
  40. package/src/hooks/useMRT_TableOptions.ts +7 -2
  41. package/src/icons.ts +12 -0
  42. package/src/locales/hy.ts +93 -0
  43. package/src/table/MRT_Table.tsx +4 -2
  44. package/src/toolbar/MRT_TablePagination.tsx +135 -68
  45. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +53 -15
  46. package/src/toolbar/MRT_TopToolbar.tsx +1 -1
  47. package/src/types.ts +22 -9
@@ -51,7 +51,7 @@ export const MRT_TableDetailPanel = <TData extends Record<string, any>>({
51
51
  className="Mui-TableBodyCell-DetailPanel"
52
52
  {...tableRowProps}
53
53
  sx={(theme) => ({
54
- display: layoutMode === 'grid' ? 'flex' : 'table-row',
54
+ display: layoutMode?.startsWith('grid') ? 'flex' : undefined,
55
55
  position: virtualRow ? 'absolute' : undefined,
56
56
  top: virtualRow
57
57
  ? `${parentRowRef.current?.getBoundingClientRect()?.height}px`
@@ -70,10 +70,10 @@ export const MRT_TableDetailPanel = <TData extends Record<string, any>>({
70
70
  {...tableCellProps}
71
71
  sx={(theme) => ({
72
72
  backgroundColor: virtualRow
73
- ? lighten(theme.palette.background.default, 0.06)
73
+ ? lighten(theme.palette.background.default, 0.05)
74
74
  : undefined,
75
75
  borderBottom: !row.getIsExpanded() ? 'none' : undefined,
76
- display: layoutMode === 'grid' ? 'flex' : 'table-cell',
76
+ display: layoutMode?.startsWith('grid') ? 'flex' : 'table-cell',
77
77
  pb: row.getIsExpanded() ? '1rem' : 0,
78
78
  pt: row.getIsExpanded() ? '1rem' : 0,
79
79
  transition: 'all 150ms ease-in-out',
@@ -1,6 +1,5 @@
1
1
  import { type DragEventHandler } from 'react';
2
- import IconButton from '@mui/material/IconButton';
3
- import { type IconButtonProps } from '@mui/material/IconButton';
2
+ import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
4
3
  import Tooltip from '@mui/material/Tooltip';
5
4
  import { parseFromValuesOrFunc } from '../column.utils';
6
5
  import { type MRT_TableInstance } from '../types';
@@ -1,6 +1,5 @@
1
1
  import { type MouseEvent, useState } from 'react';
2
- import IconButton from '@mui/material/IconButton';
3
- import { type IconButtonProps } from '@mui/material/IconButton';
2
+ import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
4
3
  import Tooltip from '@mui/material/Tooltip';
5
4
  import { MRT_ShowHideColumnsMenu } from '../menus/MRT_ShowHideColumnsMenu';
6
5
  import { type MRT_TableInstance } from '../types';
@@ -1,5 +1,4 @@
1
- import IconButton from '@mui/material/IconButton';
2
- import { type IconButtonProps } from '@mui/material/IconButton';
1
+ import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
3
2
  import Tooltip from '@mui/material/Tooltip';
4
3
  import { type MRT_TableInstance } from '../types';
5
4
 
@@ -1,5 +1,4 @@
1
- import IconButton from '@mui/material/IconButton';
2
- import { type IconButtonProps } from '@mui/material/IconButton';
1
+ import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
3
2
  import Tooltip from '@mui/material/Tooltip';
4
3
  import { type MRT_TableInstance } from '../types';
5
4
 
@@ -1,6 +1,5 @@
1
1
  import { useState } from 'react';
2
- import IconButton from '@mui/material/IconButton';
3
- import { type IconButtonProps } from '@mui/material/IconButton';
2
+ import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
4
3
  import Tooltip from '@mui/material/Tooltip';
5
4
  import { type MRT_TableInstance } from '../types';
6
5
 
@@ -36,7 +35,7 @@ export const MRT_ToggleFullScreenButton = <TData extends Record<string, any>>({
36
35
  title={rest?.title ?? localization.toggleFullScreen}
37
36
  >
38
37
  <IconButton
39
- aria-label={localization.showHideFilters}
38
+ aria-label={localization.toggleFullScreen}
40
39
  onClick={handleToggleFullScreen}
41
40
  onMouseEnter={() => setTooltipOpened(true)}
42
41
  onMouseLeave={() => setTooltipOpened(false)}
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
2
  import {
3
3
  createRow as _createRow,
4
4
  flexRender as _flexRender,
@@ -295,7 +295,10 @@ export const getCommonCellStyles = <TData extends Record<string, any>>({
295
295
  tableCellProps: TableCellProps;
296
296
  theme: Theme;
297
297
  }) => {
298
- const widthStyles = {
298
+ const {
299
+ options: { layoutMode },
300
+ } = table;
301
+ const widthStyles: CSSProperties = {
299
302
  minWidth: `max(calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId(
300
303
  header?.id ?? column.id,
301
304
  )}-size) * 1px), ${column.columnDef.minSize ?? 30}px)`,
@@ -303,6 +306,15 @@ export const getCommonCellStyles = <TData extends Record<string, any>>({
303
306
  header?.id ?? column.id,
304
307
  )}-size) * 1px)`,
305
308
  };
309
+
310
+ if (layoutMode === 'grid') {
311
+ widthStyles.flex = `var(--${header ? 'header' : 'col'}-${parseCSSVarId(
312
+ header?.id ?? column.id,
313
+ )}-size) 0 auto`;
314
+ } else if (layoutMode === 'grid-no-grow') {
315
+ widthStyles.flex = '0 0 auto';
316
+ }
317
+
306
318
  return {
307
319
  backgroundColor:
308
320
  column.getIsPinned() && column.columnDef.columnDefType !== 'group'
@@ -314,13 +326,7 @@ export const getCommonCellStyles = <TData extends Record<string, any>>({
314
326
  : getIsFirstRightPinnedColumn(column)
315
327
  ? `4px 0 8px -6px ${alpha(theme.palette.common.black, 0.2)} inset`
316
328
  : undefined,
317
- display: table.options.layoutMode === 'grid' ? 'flex' : 'table-cell',
318
- flex:
319
- table.options.layoutMode === 'grid'
320
- ? `var(--${header ? 'header' : 'col'}-${parseCSSVarId(
321
- header?.id ?? column.id,
322
- )}-size) 0 auto`
323
- : undefined,
329
+ display: layoutMode?.startsWith('grid') ? 'flex' : undefined,
324
330
  left:
325
331
  column.getIsPinned() === 'left'
326
332
  ? `${column.getStart('left')}px`
@@ -44,7 +44,7 @@ export const MRT_TableFooter = <TData extends Record<string, any>>({
44
44
  }}
45
45
  sx={(theme) => ({
46
46
  bottom: stickFooter ? 0 : undefined,
47
- display: layoutMode === 'grid' ? 'grid' : 'table-row-group',
47
+ display: layoutMode?.startsWith('grid') ? 'grid' : undefined,
48
48
  opacity: stickFooter ? 0.97 : undefined,
49
49
  outline: stickFooter
50
50
  ? theme.palette.mode === 'light'
@@ -35,7 +35,7 @@ export const MRT_TableFooterCell = <TData extends Record<string, any>>({
35
35
  variant="head"
36
36
  {...tableCellProps}
37
37
  sx={(theme) => ({
38
- display: layoutMode === 'grid' ? 'grid' : 'table-cell',
38
+ display: layoutMode?.startsWith('grid') ? 'grid' : 'table-cell',
39
39
  fontWeight: 'bold',
40
40
  justifyContent: columnDefType === 'group' ? 'center' : undefined,
41
41
  p:
@@ -48,8 +48,8 @@ export const MRT_TableFooterRow = <TData extends Record<string, any>>({
48
48
  <TableRow
49
49
  {...tableRowProps}
50
50
  sx={(theme) => ({
51
- backgroundColor: lighten(theme.palette.background.default, 0.04),
52
- display: layoutMode === 'grid' ? 'flex' : 'table-row',
51
+ backgroundColor: lighten(theme.palette.background.default, 0.05),
52
+ display: layoutMode?.startsWith('grid') ? 'flex' : undefined,
53
53
  width: '100%',
54
54
  ...(parseFromValuesOrFunc(tableRowProps?.sx, theme) as any),
55
55
  })}
@@ -2,6 +2,7 @@ import { type VirtualItem } from '@tanstack/react-virtual';
2
2
  import TableHead from '@mui/material/TableHead';
3
3
  import { MRT_TableHeadRow } from './MRT_TableHeadRow';
4
4
  import { parseFromValuesOrFunc } from '../column.utils';
5
+ import { MRT_ToolbarAlertBanner } from '../toolbar';
5
6
  import { type MRT_TableInstance } from '../types';
6
7
 
7
8
  interface Props<TData extends Record<string, any>> {
@@ -19,11 +20,17 @@ export const MRT_TableHead = <TData extends Record<string, any>>({
19
20
  }: Props<TData>) => {
20
21
  const {
21
22
  getHeaderGroups,
23
+ getSelectedRowModel,
22
24
  getState,
23
- options: { enableStickyHeader, layoutMode, muiTableHeadProps },
25
+ options: {
26
+ enableStickyHeader,
27
+ layoutMode,
28
+ muiTableHeadProps,
29
+ positionToolbarAlertBanner,
30
+ },
24
31
  refs: { tableHeadRef },
25
32
  } = table;
26
- const { isFullScreen } = getState();
33
+ const { isFullScreen, showAlertBanner } = getState();
27
34
 
28
35
  const tableHeadProps = parseFromValuesOrFunc(muiTableHeadProps, { table });
29
36
 
@@ -40,24 +47,39 @@ export const MRT_TableHead = <TData extends Record<string, any>>({
40
47
  }
41
48
  }}
42
49
  sx={(theme) => ({
43
- display: layoutMode === 'grid' ? 'grid' : 'table-row-group',
50
+ display: layoutMode?.startsWith('grid') ? 'grid' : undefined,
44
51
  opacity: 0.97,
45
52
  position: stickyHeader ? 'sticky' : 'relative',
46
- top: stickyHeader && layoutMode === 'grid' ? 0 : undefined,
53
+ top: stickyHeader && layoutMode?.startsWith('grid') ? 0 : undefined,
47
54
  zIndex: stickyHeader ? 2 : undefined,
48
55
  ...(parseFromValuesOrFunc(tableHeadProps?.sx, theme) as any),
49
56
  })}
50
57
  >
51
- {getHeaderGroups().map((headerGroup) => (
52
- <MRT_TableHeadRow
53
- headerGroup={headerGroup as any}
54
- key={headerGroup.id}
55
- table={table}
56
- virtualColumns={virtualColumns}
57
- virtualPaddingLeft={virtualPaddingLeft}
58
- virtualPaddingRight={virtualPaddingRight}
59
- />
60
- ))}
58
+ {positionToolbarAlertBanner === 'head-overlay' &&
59
+ (showAlertBanner || getSelectedRowModel().rows.length > 0) ? (
60
+ <tr style={{ display: layoutMode?.startsWith('grid') ? 'grid' : undefined }}>
61
+ <th
62
+ colSpan={table.getVisibleLeafColumns().length}
63
+ style={{
64
+ display: layoutMode?.startsWith('grid') ? 'grid' : 'table-cell',
65
+ padding: 0,
66
+ }}
67
+ >
68
+ <MRT_ToolbarAlertBanner table={table} />
69
+ </th>
70
+ </tr>
71
+ ) : (
72
+ getHeaderGroups().map((headerGroup) => (
73
+ <MRT_TableHeadRow
74
+ headerGroup={headerGroup as any}
75
+ key={headerGroup.id}
76
+ table={table}
77
+ virtualColumns={virtualColumns}
78
+ virtualPaddingLeft={virtualPaddingLeft}
79
+ virtualPaddingRight={virtualPaddingRight}
80
+ />
81
+ ))
82
+ )}
61
83
  </TableHead>
62
84
  );
63
85
  };
@@ -126,7 +126,7 @@ export const MRT_TableHeadCell = <TData extends Record<string, any>>({
126
126
  }}
127
127
  {...tableCellProps}
128
128
  sx={(theme: Theme) => ({
129
- flexDirection: layoutMode === 'grid' ? 'column' : undefined,
129
+ flexDirection: layoutMode?.startsWith('grid') ? 'column' : undefined,
130
130
  fontWeight: 'bold',
131
131
  overflow: 'visible',
132
132
  p:
@@ -37,9 +37,9 @@ export const MRT_TableHeadRow = <TData extends Record<string, any>>({
37
37
  <TableRow
38
38
  {...tableRowProps}
39
39
  sx={(theme) => ({
40
- backgroundColor: lighten(theme.palette.background.default, 0.04),
40
+ backgroundColor: lighten(theme.palette.background.default, 0.05),
41
41
  boxShadow: `4px 0 8px ${alpha(theme.palette.common.black, 0.1)}`,
42
- display: layoutMode === 'grid' ? 'flex' : 'table-row',
42
+ display: layoutMode?.startsWith('grid') ? 'flex' : undefined,
43
43
  top: 0,
44
44
  ...(parseFromValuesOrFunc(tableRowProps?.sx, theme) as any),
45
45
  })}
@@ -1,4 +1,4 @@
1
- import { useEffect, useRef } from 'react';
1
+ import { useEffect, useReducer, useRef } from 'react';
2
2
  import { getCanRankRows } from '../column.utils';
3
3
  import { type MRT_SortingState, type MRT_TableInstance } from '../types';
4
4
 
@@ -6,10 +6,12 @@ export const useMRT_Effects = <TData extends Record<string, any> = {}>(
6
6
  table: MRT_TableInstance<TData>,
7
7
  ) => {
8
8
  const {
9
+ getIsSomeRowsPinned,
9
10
  getState,
10
- options: { enablePagination, rowCount },
11
+ options: { enablePagination, enableRowPinning, rowCount },
11
12
  } = table;
12
13
  const {
14
+ density,
13
15
  globalFilter,
14
16
  isFullScreen,
15
17
  isLoading,
@@ -18,6 +20,7 @@ export const useMRT_Effects = <TData extends Record<string, any> = {}>(
18
20
  sorting,
19
21
  } = getState();
20
22
 
23
+ const rerender = useReducer(() => ({}), {})[1];
21
24
  const isMounted = useRef(false);
22
25
  const initialBodyHeight = useRef<string>();
23
26
  const previousTop = useRef<number>();
@@ -74,4 +77,12 @@ export const useMRT_Effects = <TData extends Record<string, any> = {}>(
74
77
  table.setSorting(() => appliedSort.current || []);
75
78
  }
76
79
  }, [globalFilter]);
80
+
81
+ useEffect(() => {
82
+ if (enableRowPinning && getIsSomeRowsPinned()) {
83
+ setTimeout(() => {
84
+ rerender();
85
+ }, 150);
86
+ }
87
+ }, [density]);
77
88
  };
@@ -93,8 +93,13 @@ export const useMRT_TableOptions: <TData extends Record<string, any>>(
93
93
  [defaultDisplayColumn],
94
94
  );
95
95
 
96
- if (rest.enableRowVirtualization || rest.enableColumnVirtualization) {
97
- layoutMode = 'grid';
96
+ if (layoutMode === 'semantic') {
97
+ if (rest.enableRowVirtualization || rest.enableColumnVirtualization) {
98
+ layoutMode = 'grid';
99
+ }
100
+ if (enableColumnResizing) {
101
+ layoutMode = 'grid-no-grow';
102
+ }
98
103
  }
99
104
 
100
105
  if (rest.enableRowVirtualization) {
package/src/icons.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
2
2
  import ArrowRightIcon from '@mui/icons-material/ArrowRight';
3
3
  import CancelIcon from '@mui/icons-material/Cancel';
4
+ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
5
+ import ChevronRightIcon from '@mui/icons-material/ChevronRight';
4
6
  import ClearAllIcon from '@mui/icons-material/ClearAll';
5
7
  import CloseIcon from '@mui/icons-material/Close';
6
8
  import DensityLargeIcon from '@mui/icons-material/DensityLarge';
@@ -13,9 +15,11 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
13
15
  import FilterAltIcon from '@mui/icons-material/FilterAlt';
14
16
  import FilterListIcon from '@mui/icons-material/FilterList';
15
17
  import FilterListOffIcon from '@mui/icons-material/FilterListOff';
18
+ import FirstPageIcon from '@mui/icons-material/FirstPage';
16
19
  import FullscreenIcon from '@mui/icons-material/Fullscreen';
17
20
  import FullscreenExitIcon from '@mui/icons-material/FullscreenExit';
18
21
  import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
22
+ import LastPageIcon from '@mui/icons-material/LastPage';
19
23
  import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
20
24
  import MoreVertIcon from '@mui/icons-material/MoreVert';
21
25
  import PushPinIcon from '@mui/icons-material/PushPin';
@@ -31,6 +35,8 @@ export interface MRT_Icons {
31
35
  ArrowDownwardIcon: any;
32
36
  ArrowRightIcon: any;
33
37
  CancelIcon: any;
38
+ ChevronLeftIcon: any;
39
+ ChevronRightIcon: any;
34
40
  ClearAllIcon: any;
35
41
  CloseIcon: any;
36
42
  DensityLargeIcon: any;
@@ -43,9 +49,11 @@ export interface MRT_Icons {
43
49
  FilterAltIcon: any;
44
50
  FilterListIcon: any;
45
51
  FilterListOffIcon: any;
52
+ FirstPageIcon?: any;
46
53
  FullscreenExitIcon: any;
47
54
  FullscreenIcon: any;
48
55
  KeyboardDoubleArrowDownIcon: any;
56
+ LastPageIcon?: any;
49
57
  MoreHorizIcon: any;
50
58
  MoreVertIcon: any;
51
59
  PushPinIcon: any;
@@ -62,6 +70,8 @@ export const MRT_Default_Icons: MRT_Icons = {
62
70
  ArrowDownwardIcon,
63
71
  ArrowRightIcon,
64
72
  CancelIcon,
73
+ ChevronLeftIcon,
74
+ ChevronRightIcon,
65
75
  ClearAllIcon,
66
76
  CloseIcon,
67
77
  DensityLargeIcon,
@@ -74,9 +84,11 @@ export const MRT_Default_Icons: MRT_Icons = {
74
84
  FilterAltIcon,
75
85
  FilterListIcon,
76
86
  FilterListOffIcon,
87
+ FirstPageIcon,
77
88
  FullscreenExitIcon,
78
89
  FullscreenIcon,
79
90
  KeyboardDoubleArrowDownIcon,
91
+ LastPageIcon,
80
92
  MoreHorizIcon,
81
93
  MoreVertIcon,
82
94
  PushPinIcon,
@@ -0,0 +1,93 @@
1
+ import { type MRT_Localization } from '..';
2
+
3
+ export const MRT_Localization_HY: MRT_Localization = {
4
+ actions: 'Գործողություններ',
5
+ and: 'և',
6
+ cancel: 'Չեղարկել',
7
+ changeFilterMode: 'Փոխել զտիչի ռեժիմը',
8
+ changeSearchMode: 'Փոխել որոնման ռեժիմը',
9
+ clearFilter: 'Մաքրել զտիչը',
10
+ clearSearch: 'Մաքրել որոնումը',
11
+ clearSort: 'Մաքրել տեսակավորումը',
12
+ clickToCopy: 'Սեղմել պատճենելու համար',
13
+ columnActions: 'Սյունակի գործողություն',
14
+ copiedToClipboard: 'Պատճենվել է փոխանակման բուֆերում',
15
+ collapse: 'Փոքրացնել',
16
+ collapseAll: 'Փոքրացնել բոլորը',
17
+ dropToGroupBy: 'Ավելացնել խմբին {column}',
18
+ edit: 'Խմբագրել',
19
+ expand: 'Բացել',
20
+ expandAll: 'Բացել բոլորը',
21
+ filterArrIncludes: 'Միացնել',
22
+ filterArrIncludesAll: 'Միացնել բոլորը',
23
+ filterArrIncludesSome: 'Միացնել',
24
+ filterBetween: 'Միջև',
25
+ filterBetweenInclusive: 'Միջև ներառյալ',
26
+ filterByColumn: 'Զտել ըստ {column}',
27
+ filterContains: 'Պարունակում է',
28
+ filterEmpty: 'Դատարկ է',
29
+ filterEndsWith: 'Ավարտվում է',
30
+ filterEquals: 'Հավասար են',
31
+ filterEqualsString: 'Հավասար են',
32
+ filterFuzzy: 'Ֆազզի',
33
+ filterGreaterThan: 'Ավել է քան',
34
+ filterGreaterThanOrEqualTo: 'Ավել է կամ հավասար է',
35
+ filterInNumberRange: 'Միջև',
36
+ filterIncludesString: 'Պարունակում է',
37
+ filterIncludesStringSensitive: 'Պարունակում է (գրանցումից կախված է)',
38
+ filterLessThan: 'Փոքր է քան',
39
+ filterLessThanOrEqualTo: 'Զտիչի ռեժիմ',
40
+ filterMode: 'Զտիչի ռեժիմ: {filterType}',
41
+ filterNotEmpty: 'Դատարկ չէ',
42
+ filterNotEquals: 'Հավասար չեն',
43
+ filterStartsWith: 'Սկսվում է ...-ից',
44
+ filterWeakEquals: 'Հավասար են',
45
+ filteringByColumn: 'Զտիչը ըստ {column} - {filterType} {filterValue}',
46
+ goToFirstPage: 'Անցնել առաջին էջ',
47
+ goToLastPage: 'Անցնել վերջին էջ',
48
+ goToNextPage: 'Անցնել հաջորդ էջ',
49
+ goToPreviousPage: 'Անցնել նախորդ էջ',
50
+ grab: 'Տեղաշարժել',
51
+ groupByColumn: 'Խմբավորել ըստ {column}',
52
+ groupedBy: 'Խմբավորել',
53
+ hideAll: 'Թաքցնել բոլորը',
54
+ hideColumn: 'Թաքցնել {column} սյունակը',
55
+ max: 'Առվ',
56
+ min: 'Նվզ',
57
+ move: 'Շարժել',
58
+ noRecordsToDisplay: 'Ցուցադրման համար գրառումներ չկան',
59
+ noResultsFound: 'Արդյունքներ չեն գտնվել',
60
+ of: '-ից',
61
+ or: 'կամ',
62
+ pinToLeft: 'Կցել ձախից',
63
+ pinToRight: 'Կցել աջից',
64
+ resetColumnSize: 'Չեղարկել սյունակի չափը',
65
+ resetOrder: 'Չեղարկել կարգը',
66
+ rowActions: 'Տողի գործողությունները',
67
+ rowNumber: '#',
68
+ rowNumbers: 'Տողերի քանակը',
69
+ rowsPerPage: 'Տողեր էջում',
70
+ save: 'Պահպանել',
71
+ search: 'Գտնել',
72
+ selectedCountOfRowCountRowsSelected:
73
+ '{rowCount} տողից ընտրված է {selectedCount}',
74
+ select: 'Ընտրել',
75
+ showAll: 'Ցույց տալ բոլորը',
76
+ showAllColumns: 'Ցույց տալ բոլոր սյունակները',
77
+ showHideColumns: 'Ցույց տալ/թաքցնել սյունակները',
78
+ showHideFilters: 'Ցույց տալ/թաքցնել զտիչները',
79
+ showHideSearch: 'Ցույց տալ/թաքցնել որոնումը',
80
+ sortByColumnAsc: 'Տեսակավորել {column} ըստ աճման',
81
+ sortByColumnDesc: 'Տեսակավորել {column} ըստ նվազման',
82
+ sortedByColumnAsc: 'Տեսակավորված է ըստ {column} աճման',
83
+ sortedByColumnDesc: 'Տեսակավորված է ըստ {column} նվազման',
84
+ thenBy: ', այնուհետ ',
85
+ toggleDensity: 'Փոխել խտությունը',
86
+ toggleFullScreen: 'Միացնել ամբողջ էկրանով ռեժիմը',
87
+ toggleSelectAll: 'Ընտրել բոլորը',
88
+ toggleSelectRow: 'Փոխել տողի ընտրությունը',
89
+ toggleVisibility: 'Փոխել տեսանելիությունը',
90
+ ungroupByColumn: 'Խմբավորել ըստ {column}',
91
+ unpin: 'Ապակցել',
92
+ unpinAll: 'Ապակցել բոլորը',
93
+ };
@@ -150,9 +150,11 @@ export const MRT_Table = <TData extends Record<string, any>>({
150
150
  style={{ ...columnSizeVars, ...tableProps?.style }}
151
151
  sx={(theme) => ({
152
152
  borderCollapse: 'separate',
153
- display: layoutMode === 'grid' ? 'grid' : 'table',
153
+ display: layoutMode?.startsWith('grid') ? 'grid' : undefined,
154
154
  tableLayout:
155
- layoutMode !== 'grid' && enableColumnResizing ? 'fixed' : undefined,
155
+ layoutMode === 'semantic' && enableColumnResizing
156
+ ? 'fixed'
157
+ : undefined,
156
158
  ...(parseFromValuesOrFunc(tableProps?.sx, theme) as any),
157
159
  })}
158
160
  >