Add a proper title to the UserEdit view
This commit is contained in:
parent
491bfb1f69
commit
2ef2377926
1 changed files with 4 additions and 1 deletions
|
|
@ -9,8 +9,11 @@ import {
|
||||||
SimpleForm
|
SimpleForm
|
||||||
} from 'react-admin'
|
} from 'react-admin'
|
||||||
|
|
||||||
|
const UserTitle = ({ record }) => {
|
||||||
|
return <span>User {record ? record.name : ''}</span>
|
||||||
|
}
|
||||||
const UserEdit = (props) => (
|
const UserEdit = (props) => (
|
||||||
<Edit {...props}>
|
<Edit title={<UserTitle />} {...props}>
|
||||||
<SimpleForm>
|
<SimpleForm>
|
||||||
<TextInput source="name" validate={[required()]} />
|
<TextInput source="name" validate={[required()]} />
|
||||||
<PasswordInput source="password" validate={[required()]} />
|
<PasswordInput source="password" validate={[required()]} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue