From 5de501565570d7eb87ef6b00fadb8b962c516c77 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 12 Nov 2020 14:56:21 +0100 Subject: [PATCH] Add SearchInput to RoomFilter (#83) --- src/components/rooms.js | 15 +++++++++++---- src/synapse/dataProvider.js | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/rooms.js b/src/components/rooms.js index 5602537..041f0a6 100644 --- a/src/components/rooms.js +++ b/src/components/rooms.js @@ -9,6 +9,7 @@ import { Pagination, ReferenceField, ReferenceManyField, + SearchInput, SelectField, Show, Tab, @@ -184,15 +185,16 @@ export const RoomShow = props => { }; const RoomBulkActionButtons = props => ( - - - + + + ); const RoomFilter = ({ ...props }) => { const translate = useTranslate(); return ( + { pagination={} sort={{ field: "name", order: "ASC" }} filters={} - bulkActionButtons={} + bulkActionButtons={ + + } > { console.log("getList " + resource); - const { user_id, name, guests, deactivated } = params.filter; + const { user_id, name, guests, deactivated, search_term } = params.filter; const { page, perPage } = params.pagination; const { field, order } = params.sort; const from = (page - 1) * perPage; @@ -145,6 +145,7 @@ const dataProvider = { from: from, limit: perPage, user_id: user_id, + search_term: search_term, name: name, guests: guests, deactivated: deactivated,