Add a proper title to the UserEdit view

This commit is contained in:
Deluan 2020-01-19 22:47:39 -05:00
parent 491bfb1f69
commit 2ef2377926
1 changed files with 4 additions and 1 deletions

View File

@ -9,8 +9,11 @@ import {
SimpleForm
} from 'react-admin'
const UserTitle = ({ record }) => {
return <span>User {record ? record.name : ''}</span>
}
const UserEdit = (props) => (
<Edit {...props}>
<Edit title={<UserTitle />} {...props}>
<SimpleForm>
<TextInput source="name" validate={[required()]} />
<PasswordInput source="password" validate={[required()]} />