@mini_7/material-react-table-mcp 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/data/MIGRATION.md +136 -0
- package/data/api.json +5379 -0
- package/data/examples/advanced.tsx +309 -0
- package/data/examples/aggregation-and-grouping.tsx +153 -0
- package/data/examples/aggregation-multi.tsx +105 -0
- package/data/examples/alternate-column-filtering.tsx +49 -0
- package/data/examples/alternate-detail-panel.tsx +81 -0
- package/data/examples/alternate-pagination.tsx +23 -0
- package/data/examples/basic.tsx +109 -0
- package/data/examples/chart-detail-panel.tsx +89 -0
- package/data/examples/column-actions-space.tsx +44 -0
- package/data/examples/column-alignment.tsx +70 -0
- package/data/examples/custom-column-actions.tsx +109 -0
- package/data/examples/custom-column-filtering-ui.tsx +89 -0
- package/data/examples/custom-headless.tsx +125 -0
- package/data/examples/custom-top-toolbar.tsx +88 -0
- package/data/examples/customize-display-columns.tsx +85 -0
- package/data/examples/customize-filter-components.tsx +101 -0
- package/data/examples/customize-filter-modes.tsx +73 -0
- package/data/examples/customize-filter-variants.tsx +116 -0
- package/data/examples/customize-global-filter-component.tsx +52 -0
- package/data/examples/customize-remove-column-grouping.tsx +94 -0
- package/data/examples/customize-row-selection.tsx +54 -0
- package/data/examples/customize-table-styles.tsx +100 -0
- package/data/examples/disable-column-actions.tsx +37 -0
- package/data/examples/disable-column-hiding.tsx +90 -0
- package/data/examples/disable-density-toggle.tsx +49 -0
- package/data/examples/dynamic-columns.tsx +189 -0
- package/data/examples/editing-crud-cell.tsx +377 -0
- package/data/examples/editing-crud-modal.tsx +370 -0
- package/data/examples/editing-crud-row.tsx +333 -0
- package/data/examples/editing-crud-table.tsx +369 -0
- package/data/examples/editing-crud-tree.tsx +416 -0
- package/data/examples/enable-cell-actions.tsx +76 -0
- package/data/examples/enable-click-to-copy.tsx +39 -0
- package/data/examples/enable-column-grouping.tsx +120 -0
- package/data/examples/enable-column-ordering.tsx +48 -0
- package/data/examples/enable-column-pinning.tsx +69 -0
- package/data/examples/enable-column-resizing.tsx +56 -0
- package/data/examples/enable-column-virtualization.tsx +27 -0
- package/data/examples/enable-detail-panel-conditionally.tsx +78 -0
- package/data/examples/enable-detail-panel-virtualized.tsx +80 -0
- package/data/examples/enable-expanding-tree.tsx +110 -0
- package/data/examples/enable-filter-facet-values.tsx +65 -0
- package/data/examples/enable-row-dragging.tsx +137 -0
- package/data/examples/enable-row-numbers-original.tsx +48 -0
- package/data/examples/enable-row-numbers-static.tsx +48 -0
- package/data/examples/enable-row-ordering.tsx +57 -0
- package/data/examples/enable-row-pinning-select.tsx +76 -0
- package/data/examples/enable-row-pinning-static.tsx +50 -0
- package/data/examples/enable-row-pinning-sticky.tsx +69 -0
- package/data/examples/enable-row-selection.tsx +96 -0
- package/data/examples/enable-row-virtualization.tsx +101 -0
- package/data/examples/enable-sticky-header.tsx +59 -0
- package/data/examples/expanding-tree-expanded.tsx +121 -0
- package/data/examples/expanding-tree-flat-parse.tsx +125 -0
- package/data/examples/expanding-tree-root-expanded.tsx +151 -0
- package/data/examples/export-to-csv.tsx +114 -0
- package/data/examples/export-to-pdf.tsx +104 -0
- package/data/examples/external-toolbar.tsx +108 -0
- package/data/examples/font-awesome-icons.tsx +106 -0
- package/data/examples/infinite-scrolling.tsx +208 -0
- package/data/examples/lazy-detail-panel.tsx +262 -0
- package/data/examples/lazy-sub-rows.tsx +190 -0
- package/data/examples/linear-progress.tsx +66 -0
- package/data/examples/loading.tsx +50 -0
- package/data/examples/localization-i18n-ar.tsx +65 -0
- package/data/examples/localization-i18n-az.tsx +60 -0
- package/data/examples/localization-i18n-bg.tsx +60 -0
- package/data/examples/localization-i18n-cs.tsx +60 -0
- package/data/examples/localization-i18n-da.tsx +60 -0
- package/data/examples/localization-i18n-de.tsx +60 -0
- package/data/examples/localization-i18n-el.tsx +60 -0
- package/data/examples/localization-i18n-en.tsx +60 -0
- package/data/examples/localization-i18n-es.tsx +60 -0
- package/data/examples/localization-i18n-et.tsx +60 -0
- package/data/examples/localization-i18n-fa.tsx +66 -0
- package/data/examples/localization-i18n-fi.tsx +60 -0
- package/data/examples/localization-i18n-fr.tsx +60 -0
- package/data/examples/localization-i18n-he.tsx +66 -0
- package/data/examples/localization-i18n-hr.tsx +60 -0
- package/data/examples/localization-i18n-hu.tsx +60 -0
- package/data/examples/localization-i18n-hy.tsx +65 -0
- package/data/examples/localization-i18n-id.tsx +60 -0
- package/data/examples/localization-i18n-it.tsx +60 -0
- package/data/examples/localization-i18n-ja.tsx +60 -0
- package/data/examples/localization-i18n-ko.tsx +60 -0
- package/data/examples/localization-i18n-nl.tsx +60 -0
- package/data/examples/localization-i18n-no.tsx +60 -0
- package/data/examples/localization-i18n-np.tsx +60 -0
- package/data/examples/localization-i18n-pl.tsx +60 -0
- package/data/examples/localization-i18n-pt-BR.tsx +60 -0
- package/data/examples/localization-i18n-pt.tsx +60 -0
- package/data/examples/localization-i18n-ro.tsx +60 -0
- package/data/examples/localization-i18n-ru.tsx +60 -0
- package/data/examples/localization-i18n-sk.tsx +60 -0
- package/data/examples/localization-i18n-sr-Cyrl-RS.tsx +60 -0
- package/data/examples/localization-i18n-sr-Latn-RS.tsx +60 -0
- package/data/examples/localization-i18n-sv.tsx +60 -0
- package/data/examples/localization-i18n-tr.tsx +60 -0
- package/data/examples/localization-i18n-uk.tsx +60 -0
- package/data/examples/localization-i18n-vi.tsx +60 -0
- package/data/examples/localization-i18n-zh-hans.tsx +60 -0
- package/data/examples/localization-i18n-zh-hant.tsx +60 -0
- package/data/examples/manual-selection.tsx +105 -0
- package/data/examples/minimal.tsx +78 -0
- package/data/examples/mui-theme.tsx +136 -0
- package/data/examples/multi-sorting.tsx +58 -0
- package/data/examples/persistent-state.tsx +184 -0
- package/data/examples/react-query.tsx +182 -0
- package/data/examples/remote.tsx +150 -0
- package/data/examples/row-actions-buttons.tsx +89 -0
- package/data/examples/row-actions-menu-items.tsx +64 -0
- package/data/examples/single-row-selection.tsx +98 -0
- package/data/examples/virtualized.tsx +138 -0
- package/data/guides/accessibility.md +119 -0
- package/data/guides/aggregation.md +210 -0
- package/data/guides/async-loading.md +132 -0
- package/data/guides/best-practices.md +363 -0
- package/data/guides/cell-actions.md +139 -0
- package/data/guides/click-to-copy.md +67 -0
- package/data/guides/column-actions.md +69 -0
- package/data/guides/column-filtering.md +366 -0
- package/data/guides/column-grouping.md +192 -0
- package/data/guides/column-hiding.md +133 -0
- package/data/guides/column-ordering-dnd.md +99 -0
- package/data/guides/column-pinning.md +72 -0
- package/data/guides/column-resizing.md +157 -0
- package/data/guides/column-size.md +162 -0
- package/data/guides/customize-components.md +395 -0
- package/data/guides/customize-icons.md +35 -0
- package/data/guides/data-columns.md +292 -0
- package/data/guides/density-toggle.md +46 -0
- package/data/guides/detail-panel.md +195 -0
- package/data/guides/display-columns.md +135 -0
- package/data/guides/editing.md +367 -0
- package/data/guides/expanding-sub-rows.md +194 -0
- package/data/guides/full-screen-toggle.md +63 -0
- package/data/guides/global-filtering.md +237 -0
- package/data/guides/localization.md +57 -0
- package/data/guides/memoization.md +157 -0
- package/data/guides/pagination.md +171 -0
- package/data/guides/row-actions.md +116 -0
- package/data/guides/row-numbers.md +24 -0
- package/data/guides/row-ordering-dnd.md +51 -0
- package/data/guides/row-pinning.md +96 -0
- package/data/guides/row-selection.md +237 -0
- package/data/guides/sorting.md +190 -0
- package/data/guides/state-management.md +165 -0
- package/data/guides/sticky-header.md +41 -0
- package/data/guides/table-event-listeners.md +103 -0
- package/data/guides/toolbar-customization.md +251 -0
- package/data/guides/virtualization.md +183 -0
- package/data/index.json +1930 -0
- package/data/reference/mrt-components.md +183 -0
- package/data/reference/mrt-hooks.md +125 -0
- package/data/skills/composable-components/SKILL.md +189 -0
- package/data/skills/customization/SKILL.md +190 -0
- package/data/skills/drag-and-drop-ordering/SKILL.md +227 -0
- package/data/skills/editing/SKILL.md +243 -0
- package/data/skills/filtering/SKILL.md +213 -0
- package/data/skills/getting-started/SKILL.md +213 -0
- package/data/skills/localization/SKILL.md +182 -0
- package/data/skills/migrate-v3-to-v4/SKILL.md +161 -0
- package/data/skills/state-and-server-data/SKILL.md +200 -0
- package/data/skills/virtualization/SKILL.md +203 -0
- package/dist/data.js +137 -0
- package/dist/index.js +232 -0
- package/package.json +50 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_KO } from 'material-react-table/locales/ko';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: '이름',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: '성',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: '나이',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_KO}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { koKR } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, koKR)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_NL } from 'material-react-table/locales/nl';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Voornaam',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Achternaam',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Leeftijd',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_NL}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { nlNL } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, nlNL)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_NO } from 'material-react-table/locales/no';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Fornavn',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Etternavn',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Alder',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_NO}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { nbNO } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, nbNO)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_NP } from 'material-react-table/locales/np';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'नाम',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'थर',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'उमेर',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_NP}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { neNP } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, neNP)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_PL } from 'material-react-table/locales/pl';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Imię',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Nazwisko',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Wiek',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_PL}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { plPL } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, plPL)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_PT_BR } from 'material-react-table/locales/pt-BR';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Primeiro nome',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Sobrenome',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Era',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_PT_BR}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { ptBR } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, ptBR)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_PT } from 'material-react-table/locales/pt';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Primeiro nome',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Sobrenome',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Era',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_PT}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { ptPT } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, ptPT)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_RO } from 'material-react-table/locales/ro';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Nume',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Numele de familie',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Vârstă',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_RO}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { roRO } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, roRO)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_RU } from 'material-react-table/locales/ru';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Имя',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Фамилия',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Возраст',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_RU}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { ruRU } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, ruRU)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_SK } from 'material-react-table/locales/sk';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Meno',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Priezvisko',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Vek',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_SK}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { skSK } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, skSK)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
|
|
3
|
+
|
|
4
|
+
//Import Material React Table Translations
|
|
5
|
+
import { MRT_Localization_SR_CYRL_RS } from 'material-react-table/locales/sr-Cyrl-RS';
|
|
6
|
+
|
|
7
|
+
//mock data
|
|
8
|
+
import { data, type Person } from './makeData';
|
|
9
|
+
|
|
10
|
+
const columns: MRT_ColumnDef<Person>[] = [
|
|
11
|
+
//column definitions...
|
|
12
|
+
{
|
|
13
|
+
accessorKey: 'firstName',
|
|
14
|
+
header: 'Име',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'lastName',
|
|
18
|
+
header: 'Презиме',
|
|
19
|
+
enableClickToCopy: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessorKey: 'age',
|
|
23
|
+
header: 'Старост',
|
|
24
|
+
},
|
|
25
|
+
//end
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const Example = () => {
|
|
29
|
+
return (
|
|
30
|
+
<MaterialReactTable
|
|
31
|
+
columns={columns}
|
|
32
|
+
data={data}
|
|
33
|
+
enableColumnFilterModes
|
|
34
|
+
enableColumnOrdering
|
|
35
|
+
enableEditing
|
|
36
|
+
enableColumnPinning
|
|
37
|
+
enableRowActions
|
|
38
|
+
enableRowSelection
|
|
39
|
+
enableSelectAll={false}
|
|
40
|
+
initialState={{ showColumnFilters: true, showGlobalFilter: true }}
|
|
41
|
+
localization={MRT_Localization_SR_CYRL_RS}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//App.tsx or similar
|
|
47
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
48
|
+
import { srRS } from '@mui/material/locale';
|
|
49
|
+
|
|
50
|
+
const ExampleWithThemeProvider = () => {
|
|
51
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
52
|
+
return (
|
|
53
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
54
|
+
<ThemeProvider theme={createTheme(theme, srRS)}>
|
|
55
|
+
<Example />
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default ExampleWithThemeProvider;
|