Skip to content

Commit 84b2205

Browse files
committed
Retype JSX element as string
1 parent a11fbcb commit 84b2205

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

packages/admin/admin/src/theme/componentsTheme/MuiDataGrid.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from "@mui/material";
1515
import { COMFORTABLE_DENSITY_FACTOR, COMPACT_DENSITY_FACTOR, getDataGridUtilityClass, gridClasses } from "@mui/x-data-grid";
1616
import type {} from "@mui/x-data-grid/themeAugmentation";
17+
import { FormattedMessage, FormattedNumber } from "react-intl";
1718

1819
import { DataGridPanel } from "../../dataGrid/DataGridPanel";
1920
import { mergeOverrideStyles } from "../utils/mergeOverrideStyles";
@@ -72,20 +73,19 @@ export const getMuiDataGrid: GetMuiComponentTheme<"MuiDataGrid"> = (component, {
7273
},
7374
},
7475
localeText: {
75-
// TODO: check typing
76-
paginationDisplayedRows: ({ from, to, count }) => "todo",
77-
// (
78-
// <FormattedMessage
79-
// id="dataGrid.pagination.labelDisplayedRows"
80-
// defaultMessage="{from}–{to} of {formattedCount} {count, plural, one {item} other {items}}"
81-
// values={{
82-
// from: <FormattedNumber value={from} />,
83-
// to: <FormattedNumber value={to} />,
84-
// formattedCount: <FormattedNumber value={count} />,
85-
// count,
86-
// }}
87-
// />
88-
// ),
76+
paginationDisplayedRows: ({ from, to, count }) =>
77+
(
78+
<FormattedMessage
79+
id="dataGrid.pagination.labelDisplayedRows"
80+
defaultMessage="{from}–{to} of {formattedCount} {count, plural, one {item} other {items}}"
81+
values={{
82+
from: <FormattedNumber value={from} />,
83+
to: <FormattedNumber value={to} />,
84+
formattedCount: <FormattedNumber value={count} />,
85+
count,
86+
}}
87+
/>
88+
) as unknown as string,
8989
...component?.defaultProps?.localeText,
9090
},
9191
},

0 commit comments

Comments
 (0)