From 7aec6f9369f70c317f7eced958e3856750b2ca28 Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Wed, 15 Apr 2020 15:31:10 +0200 Subject: [PATCH] Allow searching for users Change-Id: Icf4a3b05b24c66971f55b22e7540a1dc904a3a92 --- src/components/users.js | 2 ++ src/synapse/dataProvider.js | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/components/users.js b/src/components/users.js index 3ac6575..9c92899 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -12,6 +12,7 @@ import { PasswordInput, TextField, TextInput, + SearchInput, ReferenceField, SaveButton, Toolbar, @@ -21,6 +22,7 @@ import SaveQrButton from "./SaveQrButton"; const UserFilter = props => ( + ({ + data: json["results"].map(u => ({ + ...u, + id: u.user_id, + name: u.user_id, + })), + total: json.limited ? perPage * 2 : json.results.length, + })); + } + return jsonClient(url).then(({ json }) => ({ data: json[res.data].map(res.map), total: res.total(json, perPage),