mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-24 08:35:31 +03:00
Merge pull request #8 from etkecc/fix-users-edit-tab
Fix user's Edit action defualt Tab not being shown
This commit is contained in:
commit
4a4fae104e
1 changed files with 7 additions and 1 deletions
|
@ -53,6 +53,8 @@ import {
|
|||
useListContext,
|
||||
useNotify,
|
||||
ToolbarClasses,
|
||||
Identifier,
|
||||
RaRecord,
|
||||
} from "react-admin";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
|
@ -140,6 +142,10 @@ const UserBulkActionButtons = () => {
|
|||
</>
|
||||
};
|
||||
|
||||
const usersRowClick = (id: Identifier, resource: string, record: RaRecord): string => {
|
||||
return `/users/${id}`;
|
||||
};
|
||||
|
||||
export const UserList = (props: ListProps) => (
|
||||
<List
|
||||
{...props}
|
||||
|
@ -149,7 +155,7 @@ export const UserList = (props: ListProps) => (
|
|||
actions={<UserListActions />}
|
||||
pagination={<UserPagination />}
|
||||
>
|
||||
<Datagrid rowClick="edit" bulkActionButtons={<UserBulkActionButtons />}>
|
||||
<Datagrid rowClick={usersRowClick} bulkActionButtons={<UserBulkActionButtons />}>
|
||||
<AvatarField source="avatar_src" sx={{ height: "40px", width: "40px" }} sortBy="avatar_url" />
|
||||
<TextField source="id" sortBy="name" />
|
||||
<TextField source="displayname" />
|
||||
|
|
Loading…
Reference in a new issue