material-react-table 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +16 -17
- package/dist/index.esm.js +28 -40
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -40
- package/dist/index.js.map +1 -1
- package/locales/am/index.d.ts +3 -0
- package/locales/am/index.esm.d.ts +3 -0
- package/locales/am/index.esm.js +93 -0
- package/locales/am/index.js +97 -0
- package/locales/am/package.json +6 -0
- package/locales/el/index.d.ts +3 -0
- package/locales/el/index.esm.d.ts +3 -0
- package/locales/el/index.esm.js +95 -0
- package/locales/el/index.js +99 -0
- package/locales/el/package.json +6 -0
- package/locales/hr/index.d.ts +3 -0
- package/locales/hr/index.esm.d.ts +3 -0
- package/locales/hr/index.esm.js +95 -0
- package/locales/hr/index.js +99 -0
- package/locales/hr/package.json +6 -0
- package/locales/pl/index.esm.js +5 -5
- package/locales/pl/index.js +5 -5
- package/package.json +35 -36
- package/src/components/buttons/MRT_EditActionButtons.tsx +2 -0
- package/src/components/inputs/MRT_FilterTextField.tsx +22 -44
- package/src/components/inputs/MRT_SelectCheckbox.tsx +1 -1
- package/src/components/menus/MRT_ShowHideColumnsMenuItems.tsx +1 -4
- package/src/components/table/MRT_TablePaper.tsx +4 -1
- package/src/components/toolbar/MRT_TablePagination.tsx +10 -12
- package/src/hooks/useMRT_ColumnVirtualizer.ts +6 -8
- package/src/hooks/useMRT_TableOptions.ts +10 -6
- package/src/locales/el.ts +96 -0
- package/src/locales/hr.ts +96 -0
- package/src/locales/pl.ts +5 -5
- package/src/types.ts +12 -13
package/locales/pl/index.esm.js
CHANGED
@@ -55,7 +55,7 @@ const MRT_Localization_PL = {
|
|
55
55
|
max: 'Maks.',
|
56
56
|
min: 'Min.',
|
57
57
|
move: 'Przenieś',
|
58
|
-
noRecordsToDisplay: 'Brak
|
58
|
+
noRecordsToDisplay: 'Brak wyników do wyświetlenia',
|
59
59
|
noResultsFound: 'Brak wyników',
|
60
60
|
of: 'z',
|
61
61
|
or: 'lub',
|
@@ -66,11 +66,11 @@ const MRT_Localization_PL = {
|
|
66
66
|
resetOrder: 'Resetuj kolejność',
|
67
67
|
rowActions: 'Akcje dla rekordu',
|
68
68
|
rowNumber: '#',
|
69
|
-
rowNumbers: 'Liczba
|
70
|
-
rowsPerPage: '
|
69
|
+
rowNumbers: 'Liczba wyników',
|
70
|
+
rowsPerPage: 'Wyników na stronę',
|
71
71
|
save: 'Zapisz',
|
72
72
|
search: 'Szukaj',
|
73
|
-
selectedCountOfRowCountRowsSelected: 'Wybrano {selectedCount} z {rowCount}
|
73
|
+
selectedCountOfRowCountRowsSelected: 'Wybrano {selectedCount} z {rowCount} wyników',
|
74
74
|
select: 'Wybierz',
|
75
75
|
showAll: 'Pokaż wszystko',
|
76
76
|
showAllColumns: 'Pokaż wszystkie kolumny',
|
@@ -82,7 +82,7 @@ const MRT_Localization_PL = {
|
|
82
82
|
sortedByColumnAsc: 'Sortuj wg {column} rosnąco',
|
83
83
|
sortedByColumnDesc: 'Sortuj wg {column} malejąco',
|
84
84
|
thenBy: ', następnie wg ',
|
85
|
-
toggleDensity: 'Przełącz gęstość
|
85
|
+
toggleDensity: 'Przełącz gęstość wyników',
|
86
86
|
toggleFullScreen: 'Tryb pełnoekranowy',
|
87
87
|
toggleSelectAll: 'Zaznacz wszystkie',
|
88
88
|
toggleSelectRow: 'Zaznacz rekord',
|
package/locales/pl/index.js
CHANGED
@@ -59,7 +59,7 @@ const MRT_Localization_PL = {
|
|
59
59
|
max: 'Maks.',
|
60
60
|
min: 'Min.',
|
61
61
|
move: 'Przenieś',
|
62
|
-
noRecordsToDisplay: 'Brak
|
62
|
+
noRecordsToDisplay: 'Brak wyników do wyświetlenia',
|
63
63
|
noResultsFound: 'Brak wyników',
|
64
64
|
of: 'z',
|
65
65
|
or: 'lub',
|
@@ -70,11 +70,11 @@ const MRT_Localization_PL = {
|
|
70
70
|
resetOrder: 'Resetuj kolejność',
|
71
71
|
rowActions: 'Akcje dla rekordu',
|
72
72
|
rowNumber: '#',
|
73
|
-
rowNumbers: 'Liczba
|
74
|
-
rowsPerPage: '
|
73
|
+
rowNumbers: 'Liczba wyników',
|
74
|
+
rowsPerPage: 'Wyników na stronę',
|
75
75
|
save: 'Zapisz',
|
76
76
|
search: 'Szukaj',
|
77
|
-
selectedCountOfRowCountRowsSelected: 'Wybrano {selectedCount} z {rowCount}
|
77
|
+
selectedCountOfRowCountRowsSelected: 'Wybrano {selectedCount} z {rowCount} wyników',
|
78
78
|
select: 'Wybierz',
|
79
79
|
showAll: 'Pokaż wszystko',
|
80
80
|
showAllColumns: 'Pokaż wszystkie kolumny',
|
@@ -86,7 +86,7 @@ const MRT_Localization_PL = {
|
|
86
86
|
sortedByColumnAsc: 'Sortuj wg {column} rosnąco',
|
87
87
|
sortedByColumnDesc: 'Sortuj wg {column} malejąco',
|
88
88
|
thenBy: ', następnie wg ',
|
89
|
-
toggleDensity: 'Przełącz gęstość
|
89
|
+
toggleDensity: 'Przełącz gęstość wyników',
|
90
90
|
toggleFullScreen: 'Tryb pełnoekranowy',
|
91
91
|
toggleSelectAll: 'Zaznacz wszystkie',
|
92
92
|
toggleSelectRow: 'Zaznacz rekord',
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "2.
|
2
|
+
"version": "2.13.0",
|
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.",
|
@@ -56,39 +56,38 @@
|
|
56
56
|
"lib:dev": "rollup -c rollup.config.mjs --watch",
|
57
57
|
"lint": "eslint .",
|
58
58
|
"size": "size-limit",
|
59
|
-
"storybook": "
|
59
|
+
"storybook": "storybook dev -p 6006",
|
60
60
|
"storybook:build": "storybook build",
|
61
|
-
"storybook:dev": "storybook dev -p 6006"
|
61
|
+
"storybook:dev": "storybook dev -p 6006",
|
62
|
+
"build-storybook": "storybook build"
|
62
63
|
},
|
63
64
|
"devDependencies": {
|
64
|
-
"@
|
65
|
-
"@
|
66
|
-
"@emotion/react": "^11.11.3",
|
67
|
-
"@emotion/styled": "^11.11.0",
|
65
|
+
"@emotion/react": "^11.11.4",
|
66
|
+
"@emotion/styled": "^11.11.5",
|
68
67
|
"@faker-js/faker": "^8.4.1",
|
69
|
-
"@mui/icons-material": "^5.15.
|
70
|
-
"@mui/material": "^5.15.
|
71
|
-
"@mui/x-date-pickers": "^
|
68
|
+
"@mui/icons-material": "^5.15.15",
|
69
|
+
"@mui/material": "^5.15.15",
|
70
|
+
"@mui/x-date-pickers": "^7.2.0",
|
72
71
|
"@rollup/plugin-typescript": "^11.1.6",
|
73
|
-
"@size-limit/preset-small-lib": "^11.
|
74
|
-
"@storybook/addon-a11y": "^
|
75
|
-
"@storybook/addon-essentials": "^
|
76
|
-
"@storybook/addon-
|
77
|
-
"@storybook/addon-
|
78
|
-
"@storybook/
|
79
|
-
"@storybook/
|
80
|
-
"@storybook/react": "^
|
81
|
-
"@storybook/react-vite": "^
|
82
|
-
"@
|
83
|
-
"@types/
|
84
|
-
"@types/react": "^18.2.
|
85
|
-
"@
|
86
|
-
"@typescript-eslint/
|
87
|
-
"@typescript-eslint/parser": "^7.0.1",
|
72
|
+
"@size-limit/preset-small-lib": "^11.1.2",
|
73
|
+
"@storybook/addon-a11y": "^8.0.8",
|
74
|
+
"@storybook/addon-essentials": "^8.0.8",
|
75
|
+
"@storybook/addon-links": "^8.0.8",
|
76
|
+
"@storybook/addon-storysource": "^8.0.8",
|
77
|
+
"@storybook/blocks": "^8.0.8",
|
78
|
+
"@storybook/preview-api": "^8.0.8",
|
79
|
+
"@storybook/react": "^8.0.8",
|
80
|
+
"@storybook/react-vite": "^8.0.8",
|
81
|
+
"@types/node": "^20.12.7",
|
82
|
+
"@types/react": "^18.2.79",
|
83
|
+
"@types/react-dom": "^18.2.25",
|
84
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
85
|
+
"@typescript-eslint/parser": "^7.7.0",
|
88
86
|
"@vitejs/plugin-react": "^4.2.1",
|
89
|
-
"eslint": "^
|
87
|
+
"eslint": "^9.0.0",
|
90
88
|
"eslint-plugin-mui-path-imports": "^0.0.15",
|
91
|
-
"eslint-plugin-perfectionist": "^2.
|
89
|
+
"eslint-plugin-perfectionist": "^2.9.0",
|
90
|
+
"eslint-plugin-storybook": "^0.8.0",
|
92
91
|
"prop-types": "^15.8.1",
|
93
92
|
"react": "^18.2.0",
|
94
93
|
"react-dom": "^18.2.0",
|
@@ -98,12 +97,12 @@
|
|
98
97
|
"rollup-plugin-delete": "^2.0.0",
|
99
98
|
"rollup-plugin-dts": "^6.1.0",
|
100
99
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
101
|
-
"size-limit": "^11.
|
102
|
-
"storybook": "^
|
103
|
-
"storybook-dark-mode": "^
|
100
|
+
"size-limit": "^11.1.2",
|
101
|
+
"storybook": "^8.0.8",
|
102
|
+
"storybook-dark-mode": "^4.0.1",
|
104
103
|
"tslib": "^2.6.2",
|
105
|
-
"typescript": "^5.
|
106
|
-
"vite": "^5.
|
104
|
+
"typescript": "^5.4.5",
|
105
|
+
"vite": "^5.2.9"
|
107
106
|
},
|
108
107
|
"peerDependencies": {
|
109
108
|
"@emotion/react": ">=11.11",
|
@@ -115,9 +114,9 @@
|
|
115
114
|
"react-dom": ">=17.0"
|
116
115
|
},
|
117
116
|
"dependencies": {
|
118
|
-
"@tanstack/match-sorter-utils": "8.
|
119
|
-
"@tanstack/react-table": "8.
|
120
|
-
"@tanstack/react-virtual": "3.
|
117
|
+
"@tanstack/match-sorter-utils": "8.15.1",
|
118
|
+
"@tanstack/react-table": "8.16.0",
|
119
|
+
"@tanstack/react-virtual": "3.3.0",
|
121
120
|
"highlight-words": "1.2.2"
|
122
121
|
}
|
123
|
-
}
|
122
|
+
}
|
@@ -105,6 +105,7 @@ export const MRT_EditActionButtons = <TData extends MRT_RowData>({
|
|
105
105
|
<IconButton
|
106
106
|
aria-label={localization.save}
|
107
107
|
color="info"
|
108
|
+
disabled={isSaving}
|
108
109
|
onClick={handleSubmitRow}
|
109
110
|
>
|
110
111
|
{isSaving ? <CircularProgress size={18} /> : <SaveIcon />}
|
@@ -118,6 +119,7 @@ export const MRT_EditActionButtons = <TData extends MRT_RowData>({
|
|
118
119
|
{localization.cancel}
|
119
120
|
</Button>
|
120
121
|
<Button
|
122
|
+
disabled={isSaving}
|
121
123
|
onClick={handleSubmitRow}
|
122
124
|
sx={{ minWidth: '100px' }}
|
123
125
|
variant="contained"
|
@@ -16,18 +16,9 @@ import MenuItem from '@mui/material/MenuItem';
|
|
16
16
|
import TextField, { type TextFieldProps } from '@mui/material/TextField';
|
17
17
|
import Tooltip from '@mui/material/Tooltip';
|
18
18
|
import { debounce } from '@mui/material/utils';
|
19
|
-
import {
|
20
|
-
|
21
|
-
|
22
|
-
} from '@mui/x-date-pickers/DatePicker';
|
23
|
-
import {
|
24
|
-
DateTimePicker,
|
25
|
-
type DateTimePickerProps,
|
26
|
-
} from '@mui/x-date-pickers/DateTimePicker';
|
27
|
-
import {
|
28
|
-
TimePicker,
|
29
|
-
type TimePickerProps,
|
30
|
-
} from '@mui/x-date-pickers/TimePicker';
|
19
|
+
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
20
|
+
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
|
21
|
+
import { TimePicker } from '@mui/x-date-pickers/TimePicker';
|
31
22
|
import {
|
32
23
|
type DropdownOption,
|
33
24
|
type MRT_Header,
|
@@ -73,46 +64,33 @@ export const MRT_FilterTextField = <TData extends MRT_RowData>({
|
|
73
64
|
const { columnDef } = column;
|
74
65
|
const { filterVariant } = columnDef;
|
75
66
|
|
76
|
-
const
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
}),
|
67
|
+
const args = { column, rangeFilterIndex, table };
|
68
|
+
|
69
|
+
const textFieldProps = {
|
70
|
+
...parseFromValuesOrFunc(muiFilterTextFieldProps, args),
|
71
|
+
...parseFromValuesOrFunc(columnDef.muiFilterTextFieldProps, args),
|
82
72
|
...rest,
|
83
73
|
};
|
84
74
|
|
85
75
|
const autocompleteProps = {
|
86
|
-
...parseFromValuesOrFunc(muiFilterAutocompleteProps,
|
87
|
-
...parseFromValuesOrFunc(columnDef.muiFilterAutocompleteProps,
|
88
|
-
column,
|
89
|
-
table,
|
90
|
-
}),
|
76
|
+
...parseFromValuesOrFunc(muiFilterAutocompleteProps, args),
|
77
|
+
...parseFromValuesOrFunc(columnDef.muiFilterAutocompleteProps, args),
|
91
78
|
};
|
92
79
|
|
93
|
-
const datePickerProps
|
94
|
-
...parseFromValuesOrFunc(muiFilterDatePickerProps,
|
95
|
-
...parseFromValuesOrFunc(columnDef.muiFilterDatePickerProps,
|
96
|
-
|
97
|
-
table,
|
98
|
-
}),
|
99
|
-
};
|
80
|
+
const datePickerProps = {
|
81
|
+
...parseFromValuesOrFunc(muiFilterDatePickerProps, args),
|
82
|
+
...parseFromValuesOrFunc(columnDef.muiFilterDatePickerProps, args),
|
83
|
+
} as any;
|
100
84
|
|
101
|
-
const dateTimePickerProps
|
102
|
-
...parseFromValuesOrFunc(muiFilterDateTimePickerProps,
|
103
|
-
...parseFromValuesOrFunc(columnDef.muiFilterDateTimePickerProps,
|
104
|
-
|
105
|
-
table,
|
106
|
-
}),
|
107
|
-
};
|
85
|
+
const dateTimePickerProps = {
|
86
|
+
...parseFromValuesOrFunc(muiFilterDateTimePickerProps, args),
|
87
|
+
...parseFromValuesOrFunc(columnDef.muiFilterDateTimePickerProps, args),
|
88
|
+
} as any;
|
108
89
|
|
109
|
-
const timePickerProps
|
110
|
-
...parseFromValuesOrFunc(muiFilterTimePickerProps,
|
111
|
-
...parseFromValuesOrFunc(columnDef.muiFilterTimePickerProps,
|
112
|
-
|
113
|
-
table,
|
114
|
-
}),
|
115
|
-
};
|
90
|
+
const timePickerProps = {
|
91
|
+
...parseFromValuesOrFunc(muiFilterTimePickerProps, args),
|
92
|
+
...parseFromValuesOrFunc(columnDef.muiFilterTimePickerProps, args),
|
93
|
+
} as any;
|
116
94
|
|
117
95
|
const {
|
118
96
|
allowedColumnFilterOptions,
|
@@ -56,10 +56,7 @@ export const MRT_ShowHideColumnsMenuItems = <TData extends MRT_RowData>({
|
|
56
56
|
const { columnDef } = column;
|
57
57
|
const { columnDefType } = columnDef;
|
58
58
|
|
59
|
-
const switchChecked =
|
60
|
-
(columnDefType !== 'group' && column.getIsVisible()) ||
|
61
|
-
(columnDefType === 'group' &&
|
62
|
-
column.getLeafColumns().some((col) => col.getIsVisible()));
|
59
|
+
const switchChecked = column.getIsVisible();
|
63
60
|
|
64
61
|
const handleToggleColumnHidden = (column: MRT_Column<TData>) => {
|
65
62
|
if (columnDefType === 'group') {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import Paper, { type PaperProps } from '@mui/material/Paper';
|
2
|
+
import { useTheme } from '@mui/material';
|
2
3
|
import { MRT_TableContainer } from './MRT_TableContainer';
|
3
4
|
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
4
5
|
import { parseFromValuesOrFunc } from '../../utils/utils';
|
@@ -33,6 +34,8 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
|
|
33
34
|
...rest,
|
34
35
|
};
|
35
36
|
|
37
|
+
const theme = useTheme();
|
38
|
+
|
36
39
|
return (
|
37
40
|
<Paper
|
38
41
|
elevation={2}
|
@@ -58,7 +61,7 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
|
|
58
61
|
right: 0,
|
59
62
|
top: 0,
|
60
63
|
width: '100dvw',
|
61
|
-
zIndex:
|
64
|
+
zIndex: theme.zIndex.modal,
|
62
65
|
}
|
63
66
|
: {}),
|
64
67
|
...paperProps?.style,
|
@@ -37,7 +37,6 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
37
37
|
const isMobile = useMediaQuery('(max-width: 720px)');
|
38
38
|
|
39
39
|
const {
|
40
|
-
getPrePaginationRowModel,
|
41
40
|
getState,
|
42
41
|
options: {
|
43
42
|
enableToolbarInternalActions,
|
@@ -45,10 +44,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
45
44
|
localization,
|
46
45
|
muiPaginationProps,
|
47
46
|
paginationDisplayMode,
|
48
|
-
rowCount,
|
49
47
|
},
|
50
|
-
setPageIndex,
|
51
|
-
setPageSize,
|
52
48
|
} = table;
|
53
49
|
const {
|
54
50
|
pagination: { pageIndex = 0, pageSize = 10 },
|
@@ -62,8 +58,8 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
62
58
|
...rest,
|
63
59
|
};
|
64
60
|
|
65
|
-
const totalRowCount =
|
66
|
-
const numberOfPages =
|
61
|
+
const totalRowCount = table.getRowCount();
|
62
|
+
const numberOfPages = table.getPageCount();
|
67
63
|
const showFirstLastPageButtons = numberOfPages > 2;
|
68
64
|
const firstRowIndex = pageIndex * pageSize;
|
69
65
|
const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
|
@@ -123,7 +119,9 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
123
119
|
id: 'mrt-rows-per-page',
|
124
120
|
}}
|
125
121
|
label={localization.rowsPerPage}
|
126
|
-
onChange={(event) =>
|
122
|
+
onChange={(event) =>
|
123
|
+
table.setPageSize(+(event.target.value as any))
|
124
|
+
}
|
127
125
|
sx={{ mb: 0 }}
|
128
126
|
value={pageSize}
|
129
127
|
variant="standard"
|
@@ -153,7 +151,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
153
151
|
<Pagination
|
154
152
|
count={numberOfPages}
|
155
153
|
disabled={disabled}
|
156
|
-
onChange={(_e, newPageIndex) => setPageIndex(newPageIndex - 1)}
|
154
|
+
onChange={(_e, newPageIndex) => table.setPageIndex(newPageIndex - 1)}
|
157
155
|
page={pageIndex + 1}
|
158
156
|
renderItem={(item) => (
|
159
157
|
<PaginationItem
|
@@ -189,7 +187,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
189
187
|
<IconButton
|
190
188
|
aria-label={localization.goToFirstPage}
|
191
189
|
disabled={disableBack}
|
192
|
-
onClick={() =>
|
190
|
+
onClick={() => table.firstPage()}
|
193
191
|
size="small"
|
194
192
|
>
|
195
193
|
<FirstPageIcon {...flipIconStyles(theme)} />
|
@@ -202,7 +200,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
202
200
|
<IconButton
|
203
201
|
aria-label={localization.goToPreviousPage}
|
204
202
|
disabled={disableBack}
|
205
|
-
onClick={() =>
|
203
|
+
onClick={() => table.previousPage()}
|
206
204
|
size="small"
|
207
205
|
>
|
208
206
|
<ChevronLeftIcon {...flipIconStyles(theme)} />
|
@@ -214,7 +212,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
214
212
|
<IconButton
|
215
213
|
aria-label={localization.goToNextPage}
|
216
214
|
disabled={disableNext}
|
217
|
-
onClick={() =>
|
215
|
+
onClick={() => table.nextPage()}
|
218
216
|
size="small"
|
219
217
|
>
|
220
218
|
<ChevronRightIcon {...flipIconStyles(theme)} />
|
@@ -227,7 +225,7 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
|
|
227
225
|
<IconButton
|
228
226
|
aria-label={localization.goToLastPage}
|
229
227
|
disabled={disableNext}
|
230
|
-
onClick={() =>
|
228
|
+
onClick={() => table.lastPage()}
|
231
229
|
size="small"
|
232
230
|
>
|
233
231
|
<LastPageIcon {...flipIconStyles(theme)} />
|
@@ -16,10 +16,7 @@ export const useMRT_ColumnVirtualizer = <
|
|
16
16
|
table: MRT_TableInstance<TData>,
|
17
17
|
): MRT_ColumnVirtualizer | undefined => {
|
18
18
|
const {
|
19
|
-
getLeftLeafColumns,
|
20
|
-
getRightLeafColumns,
|
21
19
|
getState,
|
22
|
-
getVisibleLeafColumns,
|
23
20
|
options: {
|
24
21
|
columnVirtualizerInstanceRef,
|
25
22
|
columnVirtualizerOptions,
|
@@ -28,7 +25,7 @@ export const useMRT_ColumnVirtualizer = <
|
|
28
25
|
},
|
29
26
|
refs: { tableContainerRef },
|
30
27
|
} = table;
|
31
|
-
const { columnPinning, draggingColumn } = getState();
|
28
|
+
const { columnPinning, columnVisibility, draggingColumn } = getState();
|
32
29
|
|
33
30
|
if (!enableColumnVirtualization) return undefined;
|
34
31
|
|
@@ -39,21 +36,22 @@ export const useMRT_ColumnVirtualizer = <
|
|
39
36
|
},
|
40
37
|
);
|
41
38
|
|
42
|
-
const visibleColumns = getVisibleLeafColumns();
|
39
|
+
const visibleColumns = table.getVisibleLeafColumns();
|
43
40
|
|
44
41
|
const [leftPinnedIndexes, rightPinnedIndexes] = useMemo(
|
45
42
|
() =>
|
46
43
|
enableColumnPinning
|
47
44
|
? [
|
48
|
-
|
49
|
-
|
45
|
+
table.getLeftVisibleLeafColumns().map((c) => c.getPinnedIndex()),
|
46
|
+
table
|
47
|
+
.getRightVisibleLeafColumns()
|
50
48
|
.map(
|
51
49
|
(column) => visibleColumns.length - column.getPinnedIndex() - 1,
|
52
50
|
)
|
53
51
|
.sort((a, b) => a - b),
|
54
52
|
]
|
55
53
|
: [[], []],
|
56
|
-
[columnPinning, enableColumnPinning],
|
54
|
+
[columnPinning, columnVisibility, enableColumnPinning],
|
57
55
|
);
|
58
56
|
|
59
57
|
const numPinnedLeft = leftPinnedIndexes.length;
|
@@ -228,14 +228,18 @@ export const useMRT_TableOptions: <TData extends MRT_RowData>(
|
|
228
228
|
? getFacetedUniqueValues()
|
229
229
|
: undefined,
|
230
230
|
getFilteredRowModel:
|
231
|
-
enableColumnFilters || enableGlobalFilter || enableFilters
|
231
|
+
(enableColumnFilters || enableGlobalFilter || enableFilters) &&
|
232
|
+
!manualFiltering
|
232
233
|
? getFilteredRowModel()
|
233
234
|
: undefined,
|
234
|
-
getGroupedRowModel:
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
235
|
+
getGroupedRowModel:
|
236
|
+
enableGrouping && !manualGrouping ? getGroupedRowModel() : undefined,
|
237
|
+
getPaginationRowModel:
|
238
|
+
enablePagination && !manualPagination
|
239
|
+
? getPaginationRowModel()
|
240
|
+
: undefined,
|
241
|
+
getSortedRowModel:
|
242
|
+
enableSorting && !manualSorting ? getSortedRowModel() : undefined,
|
239
243
|
getSubRows: (row) => row?.subRows,
|
240
244
|
icons,
|
241
245
|
layoutMode,
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { type MRT_Localization } from '..';
|
2
|
+
|
3
|
+
export const MRT_Localization_EL: MRT_Localization = {
|
4
|
+
actions: 'Ενέργειες',
|
5
|
+
and: 'και',
|
6
|
+
cancel: 'Ακύρωση',
|
7
|
+
changeFilterMode: 'Αλλαγή λειτουργίας φίλτρου',
|
8
|
+
changeSearchMode: 'Αλλαγή λειτουργίας αναζήτησης',
|
9
|
+
clearFilter: 'Καθαρισμός φίλτρου',
|
10
|
+
clearSearch: 'Καθαρισμός αναζήτησης',
|
11
|
+
clearSelection: 'Καθαρισμός επιλογής',
|
12
|
+
clearSort: 'Καθαρισμός ταξινόμησης',
|
13
|
+
clickToCopy: 'Κλικ για αντιγραφή',
|
14
|
+
copy: 'Αντιγραφή',
|
15
|
+
collapse: 'Σύμπτυξη',
|
16
|
+
collapseAll: 'Σύμπτυξη όλων',
|
17
|
+
columnActions: 'Ενέργειες στη στήλη',
|
18
|
+
copiedToClipboard: 'Αντιγράφηκε στο πρόχειρο',
|
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
|
+
pin: 'Καρφίτσωμα',
|
65
|
+
pinToLeft: 'Καρφίτσωμα αριστερά',
|
66
|
+
pinToRight: 'Καρφίτσωμα δεξιά',
|
67
|
+
resetColumnSize: 'Επαναφορά μεγέθους στήλης',
|
68
|
+
resetOrder: 'Επαναφορά ταξινόμησης',
|
69
|
+
rowActions: 'Ενέργειες γραμμής',
|
70
|
+
rowNumber: '#',
|
71
|
+
rowNumbers: 'Αριθμοί γραμμών',
|
72
|
+
rowsPerPage: 'Γραμμές ανά σελίδα',
|
73
|
+
save: 'Αποθήκευση',
|
74
|
+
search: 'Αναζήτηση',
|
75
|
+
selectedCountOfRowCountRowsSelected:
|
76
|
+
'{selectedCount} από {rowCount} επιλεγμένη(ες) γραμμή(ες)',
|
77
|
+
select: 'Επιλογή',
|
78
|
+
showAll: 'Εμφάνιση όλων',
|
79
|
+
showAllColumns: 'Εμφάνιση όλων των στηλών',
|
80
|
+
showHideColumns: 'Εμφάνιση/απόκρυψη στηλών',
|
81
|
+
showHideFilters: 'Εμφάνιση/απόκρυψη φίλτρων',
|
82
|
+
showHideSearch: 'Εμφάνιση/απόκρυψη αναζήτησης',
|
83
|
+
sortByColumnAsc: 'Ταξινόμηση κατά {column} αύξουσα',
|
84
|
+
sortByColumnDesc: 'Ταξινόμηση κατά {column} φθίνουσα',
|
85
|
+
sortedByColumnAsc: 'Ταξινόμηση κατά {column} αύξουσα',
|
86
|
+
sortedByColumnDesc: 'Ταξινόμηση κατά {column} φθίνουσα',
|
87
|
+
thenBy: ', στη συνέχεια από ',
|
88
|
+
toggleDensity: 'Εναλλαγή πυκνότητας',
|
89
|
+
toggleFullScreen: 'Εναλλαγή πλήρους οθόνης',
|
90
|
+
toggleSelectAll: 'Εναλλαγή επιλογής όλων',
|
91
|
+
toggleSelectRow: 'Εναλλαγή επιλογής γραμμής',
|
92
|
+
toggleVisibility: 'Εναλλαγή ορατότητας',
|
93
|
+
ungroupByColumn: 'Αναίρεση ομαδοποίησης κατά {column}',
|
94
|
+
unpin: 'Αποκαρφίτσωση',
|
95
|
+
unpinAll: 'Αποκαρφίτσωση όλων',
|
96
|
+
};
|