mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-28 19:39:08 +03:00
Fix user's Edit action defualt Tab not being shown
This commit is contained in:
parent
b5b593945d
commit
265b5157af
1 changed files with 7 additions and 1 deletions
|
@ -53,6 +53,8 @@ import {
|
||||||
useListContext,
|
useListContext,
|
||||||
useNotify,
|
useNotify,
|
||||||
ToolbarClasses,
|
ToolbarClasses,
|
||||||
|
Identifier,
|
||||||
|
RaRecord,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
import { Link } from "react-router-dom";
|
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) => (
|
export const UserList = (props: ListProps) => (
|
||||||
<List
|
<List
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -149,7 +155,7 @@ export const UserList = (props: ListProps) => (
|
||||||
actions={<UserListActions />}
|
actions={<UserListActions />}
|
||||||
pagination={<UserPagination />}
|
pagination={<UserPagination />}
|
||||||
>
|
>
|
||||||
<Datagrid rowClick="edit" bulkActionButtons={<UserBulkActionButtons />}>
|
<Datagrid rowClick={usersRowClick} bulkActionButtons={<UserBulkActionButtons />}>
|
||||||
<AvatarField source="avatar_src" sx={{ height: "40px", width: "40px" }} sortBy="avatar_url" />
|
<AvatarField source="avatar_src" sx={{ height: "40px", width: "40px" }} sortBy="avatar_url" />
|
||||||
<TextField source="id" sortBy="name" />
|
<TextField source="id" sortBy="name" />
|
||||||
<TextField source="displayname" />
|
<TextField source="displayname" />
|
||||||
|
|
Loading…
Reference in a new issue