Enable sorting of user list (#133)

New in Synapse 1.32.0
Fixes: #132, #136
This commit is contained in:
Dirk Klimpel 2021-05-05 19:36:47 +02:00 committed by GitHub
parent dda8ba5e85
commit 5a5a7143af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -4,7 +4,7 @@
This project is built using [react-admin](https://marmelab.com/react-admin/). This project is built using [react-admin](https://marmelab.com/react-admin/).
It needs at least Synapse v1.29.0 for all functions to work as expected! It needs at least Synapse v1.32.0 for all functions to work as expected!
You get your server version with the request `/_synapse/admin/v1/server_version`. You get your server version with the request `/_synapse/admin/v1/server_version`.
See also [Synapse version API](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/version_api.rst). See also [Synapse version API](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/version_api.rst).

View file

@ -162,6 +162,7 @@ export const UserList = props => {
{...props} {...props}
filters={<UserFilter />} filters={<UserFilter />}
filterDefaultValues={{ guests: true, deactivated: false }} filterDefaultValues={{ guests: true, deactivated: false }}
sort={{ field: "name", order: "ASC" }}
actions={<UserListActions maxResults={10000} />} actions={<UserListActions maxResults={10000} />}
bulkActionButtons={<UserBulkActionButtons />} bulkActionButtons={<UserBulkActionButtons />}
pagination={<UserPagination />} pagination={<UserPagination />}
@ -169,14 +170,14 @@ export const UserList = props => {
<Datagrid rowClick="edit"> <Datagrid rowClick="edit">
<AvatarField <AvatarField
source="avatar_src" source="avatar_src"
sortable={false}
className={classes.small} className={classes.small}
sortBy="avatar_url"
/> />
<TextField source="id" sortable={false} /> <TextField source="id" sortBy="name" />
<TextField source="displayname" sortable={false} /> <TextField source="displayname" />
<BooleanField source="is_guest" sortable={false} /> <BooleanField source="is_guest" />
<BooleanField source="admin" sortable={false} /> <BooleanField source="admin" />
<BooleanField source="deactivated" sortable={false} /> <BooleanField source="deactivated" />
</Datagrid> </Datagrid>
</List> </List>
); );