@mini_7/material-react-table-mcp 4.0.0 → 4.0.1
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 +1 -1
- package/data/examples/advanced.js +215 -0
- package/data/examples/aggregation-and-grouping.js +116 -0
- package/data/examples/aggregation-multi.js +89 -0
- package/data/examples/alternate-column-filtering.js +38 -0
- package/data/examples/alternate-detail-panel.js +65 -0
- package/data/examples/alternate-pagination.js +17 -0
- package/data/examples/basic.js +86 -0
- package/data/examples/chart-detail-panel.js +69 -0
- package/data/examples/column-actions-space.js +34 -0
- package/data/examples/column-alignment.js +58 -0
- package/data/examples/custom-column-actions.js +74 -0
- package/data/examples/custom-column-filtering-ui.js +59 -0
- package/data/examples/custom-headless.js +85 -0
- package/data/examples/custom-top-toolbar.js +60 -0
- package/data/examples/customize-display-columns.js +72 -0
- package/data/examples/customize-filter-components.js +78 -0
- package/data/examples/customize-filter-modes.js +59 -0
- package/data/examples/customize-filter-variants.js +98 -0
- package/data/examples/customize-global-filter-component.js +37 -0
- package/data/examples/customize-remove-column-grouping.js +75 -0
- package/data/examples/customize-row-selection.js +43 -0
- package/data/examples/customize-table-styles.js +81 -0
- package/data/examples/disable-column-actions.js +26 -0
- package/data/examples/disable-column-hiding.js +74 -0
- package/data/examples/disable-density-toggle.js +37 -0
- package/data/examples/dynamic-columns.js +124 -0
- package/data/examples/editing-crud-cell.js +288 -0
- package/data/examples/editing-crud-modal.js +275 -0
- package/data/examples/editing-crud-row.js +255 -0
- package/data/examples/editing-crud-table.js +280 -0
- package/data/examples/editing-crud-tree.js +328 -0
- package/data/examples/enable-cell-actions.js +52 -0
- package/data/examples/enable-click-to-copy.js +33 -0
- package/data/examples/enable-column-grouping.js +69 -0
- package/data/examples/enable-column-ordering.js +37 -0
- package/data/examples/enable-column-pinning.js +58 -0
- package/data/examples/enable-column-resizing.js +45 -0
- package/data/examples/enable-column-virtualization.js +19 -0
- package/data/examples/enable-detail-panel-conditionally.js +61 -0
- package/data/examples/enable-detail-panel-virtualized.js +64 -0
- package/data/examples/enable-expanding-tree.js +87 -0
- package/data/examples/enable-filter-facet-values.js +52 -0
- package/data/examples/enable-row-dragging.js +102 -0
- package/data/examples/enable-row-numbers-original.js +37 -0
- package/data/examples/enable-row-numbers-static.js +37 -0
- package/data/examples/enable-row-ordering.js +40 -0
- package/data/examples/enable-row-pinning-select.js +64 -0
- package/data/examples/enable-row-pinning-static.js +39 -0
- package/data/examples/enable-row-pinning-sticky.js +57 -0
- package/data/examples/enable-row-selection.js +71 -0
- package/data/examples/enable-row-virtualization.js +85 -0
- package/data/examples/enable-sticky-header.js +47 -0
- package/data/examples/expanding-tree-expanded.js +98 -0
- package/data/examples/expanding-tree-flat-parse.js +102 -0
- package/data/examples/expanding-tree-root-expanded.js +120 -0
- package/data/examples/export-to-csv.js +84 -0
- package/data/examples/export-to-pdf.js +76 -0
- package/data/examples/external-toolbar.js +82 -0
- package/data/examples/font-awesome-icons.js +62 -0
- package/data/examples/infinite-scrolling.js +137 -0
- package/data/examples/lazy-detail-panel.js +164 -0
- package/data/examples/lazy-sub-rows.js +118 -0
- package/data/examples/linear-progress.js +48 -0
- package/data/examples/loading.js +34 -0
- package/data/examples/localization-i18n-ar.js +40 -0
- package/data/examples/localization-i18n-az.js +38 -0
- package/data/examples/localization-i18n-bg.js +38 -0
- package/data/examples/localization-i18n-cs.js +38 -0
- package/data/examples/localization-i18n-da.js +38 -0
- package/data/examples/localization-i18n-de.js +38 -0
- package/data/examples/localization-i18n-el.js +38 -0
- package/data/examples/localization-i18n-en.js +38 -0
- package/data/examples/localization-i18n-es.js +38 -0
- package/data/examples/localization-i18n-et.js +38 -0
- package/data/examples/localization-i18n-fa.js +40 -0
- package/data/examples/localization-i18n-fi.js +38 -0
- package/data/examples/localization-i18n-fr.js +38 -0
- package/data/examples/localization-i18n-he.js +40 -0
- package/data/examples/localization-i18n-hr.js +38 -0
- package/data/examples/localization-i18n-hu.js +38 -0
- package/data/examples/localization-i18n-hy.js +40 -0
- package/data/examples/localization-i18n-id.js +38 -0
- package/data/examples/localization-i18n-it.js +38 -0
- package/data/examples/localization-i18n-ja.js +38 -0
- package/data/examples/localization-i18n-ko.js +38 -0
- package/data/examples/localization-i18n-nl.js +38 -0
- package/data/examples/localization-i18n-no.js +38 -0
- package/data/examples/localization-i18n-np.js +38 -0
- package/data/examples/localization-i18n-pl.js +38 -0
- package/data/examples/localization-i18n-pt-BR.js +38 -0
- package/data/examples/localization-i18n-pt.js +38 -0
- package/data/examples/localization-i18n-ro.js +38 -0
- package/data/examples/localization-i18n-ru.js +38 -0
- package/data/examples/localization-i18n-sk.js +38 -0
- package/data/examples/localization-i18n-sr-Cyrl-RS.js +38 -0
- package/data/examples/localization-i18n-sr-Latn-RS.js +38 -0
- package/data/examples/localization-i18n-sv.js +38 -0
- package/data/examples/localization-i18n-tr.js +38 -0
- package/data/examples/localization-i18n-uk.js +38 -0
- package/data/examples/localization-i18n-vi.js +38 -0
- package/data/examples/localization-i18n-zh-hans.js +38 -0
- package/data/examples/localization-i18n-zh-hant.js +38 -0
- package/data/examples/manual-selection.js +81 -0
- package/data/examples/minimal.js +66 -0
- package/data/examples/mui-theme.js +109 -0
- package/data/examples/multi-sorting.js +48 -0
- package/data/examples/persistent-state.js +126 -0
- package/data/examples/react-query.js +122 -0
- package/data/examples/remote.js +113 -0
- package/data/examples/row-actions-buttons.js +54 -0
- package/data/examples/row-actions-menu-items.js +36 -0
- package/data/examples/single-row-selection.js +74 -0
- package/data/examples/virtualized.js +122 -0
- package/dist/data.js +31 -9
- package/dist/index.js +18 -6
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_ID } from 'material-react-table/locales/id';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Nama Depan',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Nama Belakang',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Umur',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_ID}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { idID } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, idID)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_IT } from 'material-react-table/locales/it';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Nome di battesimo',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Cognome',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Età',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_IT}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { itIT } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, itIT)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_JA } from 'material-react-table/locales/ja';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'ファーストネーム',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: '苗字',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: '年',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_JA}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { jaJP } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, jaJP)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_KO } from 'material-react-table/locales/ko';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: '이름',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: '성',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: '나이',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_KO}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { koKR } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, koKR)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_NL } from 'material-react-table/locales/nl';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Voornaam',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Achternaam',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Leeftijd',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_NL}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { nlNL } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, nlNL)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_NO } from 'material-react-table/locales/no';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Fornavn',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Etternavn',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Alder',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_NO}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { nbNO } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, nbNO)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_NP } from 'material-react-table/locales/np';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'नाम',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'थर',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'उमेर',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_NP}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { neNP } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, neNP)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_PL } from 'material-react-table/locales/pl';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Imię',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Nazwisko',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Wiek',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_PL}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { plPL } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, plPL)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_PT_BR } from 'material-react-table/locales/pt-BR';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Primeiro nome',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Sobrenome',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Era',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_PT_BR}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { ptBR } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, ptBR)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_PT } from 'material-react-table/locales/pt';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Primeiro nome',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Sobrenome',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Era',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_PT}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { ptPT } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, ptPT)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_RO } from 'material-react-table/locales/ro';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Nume',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Numele de familie',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Vârstă',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_RO}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { roRO } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, roRO)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_RU } from 'material-react-table/locales/ru';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Имя',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Фамилия',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Возраст',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_RU}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { ruRU } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, ruRU)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_SK } from 'material-react-table/locales/sk';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Meno',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Priezvisko',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Vek',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_SK}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { skSK } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, skSK)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_SR_CYRL_RS } from 'material-react-table/locales/sr-Cyrl-RS';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Име',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Презиме',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Старост',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_SR_CYRL_RS}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { srRS } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, srRS)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_SR_LATN_RS } from 'material-react-table/locales/sr-Latn-RS';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Име',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Презиме',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Старост',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_SR_LATN_RS}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { srRS } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, srRS)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_SV } from 'material-react-table/locales/sv';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'Förnamn',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Efternamn',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Ålder',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_SV}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { svSE } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, svSE)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//Import Material React Table and its Types
|
|
2
|
+
import { MaterialReactTable } from 'material-react-table';
|
|
3
|
+
//Import Material React Table Translations
|
|
4
|
+
import { MRT_Localization_TR } from 'material-react-table/locales/tr';
|
|
5
|
+
//mock data
|
|
6
|
+
import { data } from './makeData';
|
|
7
|
+
const columns = [
|
|
8
|
+
//column definitions...
|
|
9
|
+
{
|
|
10
|
+
accessorKey: 'firstName',
|
|
11
|
+
header: 'İlk adı',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
accessorKey: 'lastName',
|
|
15
|
+
header: 'Soy isim',
|
|
16
|
+
enableClickToCopy: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessorKey: 'age',
|
|
20
|
+
header: 'Yaş',
|
|
21
|
+
},
|
|
22
|
+
//end
|
|
23
|
+
];
|
|
24
|
+
const Example = () => {
|
|
25
|
+
return (<MaterialReactTable columns={columns} data={data} enableColumnFilterModes enableColumnOrdering enableEditing enableColumnPinning enableRowActions enableRowSelection enableSelectAll={false} initialState={{ showColumnFilters: true, showGlobalFilter: true }} localization={MRT_Localization_TR}/>);
|
|
26
|
+
};
|
|
27
|
+
//App.tsx or similar
|
|
28
|
+
import { createTheme, ThemeProvider, useTheme } from '@mui/material';
|
|
29
|
+
import { trTR } from '@mui/material/locale';
|
|
30
|
+
const ExampleWithThemeProvider = () => {
|
|
31
|
+
const theme = useTheme(); //replace with your theme/createTheme
|
|
32
|
+
return (
|
|
33
|
+
//Setting Material UI locale as best practice to result in better accessibility
|
|
34
|
+
<ThemeProvider theme={createTheme(theme, trTR)}>
|
|
35
|
+
<Example />
|
|
36
|
+
</ThemeProvider>);
|
|
37
|
+
};
|
|
38
|
+
export default ExampleWithThemeProvider;
|