From 1fbcd22666dc6ef9957c3af7613563ad6b271e94 Mon Sep 17 00:00:00 2001 From: Derek Leadbetter Date: Tue, 4 Apr 2023 06:21:34 -0400 Subject: [PATCH] IIIF Cloud #28 - Fixing an issue with search in dropdowns --- client/src/components/OrganizationModal.js | 2 +- client/src/components/UserModal.js | 2 +- client/src/pages/Project.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/OrganizationModal.js b/client/src/components/OrganizationModal.js index 4fff4b1..8cafda0 100644 --- a/client/src/components/OrganizationModal.js +++ b/client/src/components/OrganizationModal.js @@ -26,7 +26,7 @@ const OrganizationModal: ComponentType = withTranslation()((props) => ( > OrganizationsService.fetchAll(params)} + onSearch={(search) => OrganizationsService.fetchAll({ search })} onSelection={props.onAssociationInputChange.bind(this, 'organization_id', 'organization')} renderOption={(organization) => Organization.toDropdown(organization)} searchQuery={props.item.organization && props.item.organization.name} diff --git a/client/src/components/UserModal.js b/client/src/components/UserModal.js index 770beee..c4e2703 100644 --- a/client/src/components/UserModal.js +++ b/client/src/components/UserModal.js @@ -26,7 +26,7 @@ const UserModal: ComponentType = withTranslation()((props) => ( > UsersService.fetchAll(params)} + onSearch={(search) => UsersService.fetchAll({ search })} onSelection={props.onAssociationInputChange.bind(this, 'user_id', 'user')} renderOption={(user) => User.toDropdown(user)} searchQuery={props.item.user && props.item.user.name} diff --git a/client/src/pages/Project.js b/client/src/pages/Project.js index 07c7bb3..061e698 100644 --- a/client/src/pages/Project.js +++ b/client/src/pages/Project.js @@ -83,7 +83,7 @@ const ProjectForm = withTranslation()((props) => { > OrganizationsService.fetchAll(params)} + onSearch={(search) => OrganizationsService.fetchAll({ search })} onSelection={props.onAssociationInputChange.bind(this, 'organization_id', 'organization')} renderOption={(organization) => Organization.toDropdown(organization)} searchQuery={props.item.organization && props.item.organization.name}