From f9d2f7ef84388b8c10ca453774d748037e3f8409 Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Mon, 9 Sep 2024 10:59:49 +0200 Subject: [PATCH] fixed SRS selector --- .../form/InputChips/store/actions/useRejectSelectedItems.js | 2 +- webapp/views/App/views/Home/SurveyInfo/SrsEditor/SrsEditor.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/components/form/InputChips/store/actions/useRejectSelectedItems.js b/webapp/components/form/InputChips/store/actions/useRejectSelectedItems.js index cc7622331e..f88ddea403 100644 --- a/webapp/components/form/InputChips/store/actions/useRejectSelectedItems.js +++ b/webapp/components/form/InputChips/store/actions/useRejectSelectedItems.js @@ -12,7 +12,7 @@ export const useRejectSelectedItems = () => } return async (searchValue) => { const itemsRes = await items(searchValue) - const itemsArray = Object.values(itemsRes?.data?.items ?? {}) + const itemsArray = Array.isArray(itemsRes) ? itemsRes : Object.values(itemsRes?.data?.items ?? {}) return itemsArray.filter(removeSelectedItems) } }, []) diff --git a/webapp/views/App/views/Home/SurveyInfo/SrsEditor/SrsEditor.scss b/webapp/views/App/views/Home/SurveyInfo/SrsEditor/SrsEditor.scss index 9ebfc2f500..3a017df4cf 100644 --- a/webapp/views/App/views/Home/SurveyInfo/SrsEditor/SrsEditor.scss +++ b/webapp/views/App/views/Home/SurveyInfo/SrsEditor/SrsEditor.scss @@ -1,4 +1,4 @@ -.srs_editor__input_chips { +.srs_editor__input_chips.form-input-chip { .dropdown-wrapper, .dropdown { width: 20rem;