mirror of
https://github.com/strapi/strapi.git
synced 2025-09-07 15:49:24 +00:00
Fix react-intl in table head
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
2496f2559b
commit
566de24d88
@ -54,7 +54,10 @@ const FieldPicker = ({ layout }) => {
|
||||
{allAllowedHeaders.map(header => {
|
||||
return (
|
||||
<Option key={header.name} value={header.name}>
|
||||
{formatMessage(header.intlLabel)}
|
||||
{formatMessage({
|
||||
id: header.intlLabel.id || header.name,
|
||||
defaultMessage: header.intlLabel.defaultMessage || header.name,
|
||||
})}
|
||||
</Option>
|
||||
);
|
||||
})}
|
||||
|
@ -52,7 +52,7 @@ const TableHead = ({
|
||||
{ id: 'components.TableHeader.sort', defaultMessage: 'Sort on {label}' },
|
||||
{ label }
|
||||
);
|
||||
const intlLabel = formatMessage({ id: label, defaultMessage: label });
|
||||
const intlLabel = formatMessage({ id: label || name, defaultMessage: label || name });
|
||||
|
||||
const handleClickSort = (shouldAllowClick = true) => {
|
||||
if (isSortable && shouldAllowClick) {
|
||||
|
@ -45,7 +45,7 @@ const AttributeTag = ({ attribute, filter, onClick, operator, value }) => {
|
||||
return (
|
||||
<Box padding={1} onClick={handleClick}>
|
||||
<Tag icon={<Close />}>
|
||||
{attribute.metadatas.label}
|
||||
{attribute.metadatas.label || attribute.name}
|
||||
{formatMessage({
|
||||
id: `components.FilterOptions.FILTER_TYPES.${operator}`,
|
||||
defaultMessage: operator,
|
||||
|
Loading…
x
Reference in New Issue
Block a user