I am using react-admin for creating my website. But i am getting this warning from list page every time 'Warning: Missing translation for key: "";'
const ListTitle = () => {
return <span>User Agents</span>;
}
const SitemapFilter = props => (
<Filter {...props}>
<TextInput label="Type" source="type" alwaysOn/>
</Filter>
);
export const SitemapList = props => (
<List {...props} filters={<SitemapFilter />} title={<ListTitle />}>
<Datagrid>
<TextField source="type" label="Type"/>
<UrlField source="url" label="URL"/>
<EditButton/>
</Datagrid>
</List>
);
I am not able to find the reason. Please advise. Thanks in advance.
I have found that EditButton
component is the cause. Adding label prop to it fixes the issue.
<EditButton label="Edit" />
Check that your backend returns the proper response!
The docs on response format state:
DELETE:
{ data: {Record|null} }
The record that has been deleted (optional)
In our API the backend returned a simple HTTP 204 without a content (obviously). This caused the error:
Warning: Missing translation for key: "Cannot read property 'hasOwnProperty' of undefined"
Changing the response to be the deleted record fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With