I would like the titles of the screens, as well as the delete confirmation messages, to use a different field to identify the record to the user than the id, since the id format is not very human friendly.
I know how to customise the text of the messages and titles. However, I have no idea how to access other fields than the id param when constructing the text message.
Is this possible, or do I need to anonymise the messages to not include a reference to the actual record?
In the page headers you can use any field from the record: https://marmelab.com/react-admin/Show.html#page-title
const PostTitle = ({ record }) => {
return <span>Post {record ? `"${record.title}"` : ''}</span>;
};
export const PostShow = (props) => (
<Show title={<PostTitle />} {...props}>
...
</Show>
);
In the deletion confirmation dialog, now it is impossible to change the id field to another, in my opinion this possibility is only in development: https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.js