From e67fea2c7e1f710d77a1a1b36da01b541c312c6c Mon Sep 17 00:00:00 2001 From: Lijiaoa <61399850+Lijiaoa@users.noreply.github.com> Date: Thu, 3 Jun 2021 13:38:54 +0800 Subject: [PATCH] webui fix search bug (#3715) Co-authored-by: Lijiao --- .../src/components/trial-detail/search/searchFunction.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/webui/src/components/trial-detail/search/searchFunction.ts b/ts/webui/src/components/trial-detail/search/searchFunction.ts index 2bc4bf4bc7..e836f406ff 100644 --- a/ts/webui/src/components/trial-detail/search/searchFunction.ts +++ b/ts/webui/src/components/trial-detail/search/searchFunction.ts @@ -56,8 +56,8 @@ function getDropdownOptions(parameter): any { // change origin data according to parameter type, string -> number const convertParametersValue = (searchItems: SearchItems[], relation: Map): SearchItems[] => { const choice: any[] = []; - - searchItems.forEach(item => { + const copySearchItems = JSON.parse(JSON.stringify(searchItems)); + copySearchItems.forEach(item => { if (relation.get(item.name) === 'number') { if (item.isChoice === true) { item.choice.forEach(ele => { @@ -73,7 +73,7 @@ const convertParametersValue = (searchItems: SearchItems[], relation: Map type {conv_size -> number} const getTrialsBySearchFilters = (