Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit e67fea2

Browse files
LijiaoaLijiao
and
Lijiao
authored
webui fix search bug (#3715)
Co-authored-by: Lijiao <[email protected]>
1 parent ed40180 commit e67fea2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ts/webui/src/components/trial-detail/search/searchFunction.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ function getDropdownOptions(parameter): any {
5656
// change origin data according to parameter type, string -> number
5757
const convertParametersValue = (searchItems: SearchItems[], relation: Map<string, string>): SearchItems[] => {
5858
const choice: any[] = [];
59-
60-
searchItems.forEach(item => {
59+
const copySearchItems = JSON.parse(JSON.stringify(searchItems));
60+
copySearchItems.forEach(item => {
6161
if (relation.get(item.name) === 'number') {
6262
if (item.isChoice === true) {
6363
item.choice.forEach(ele => {
@@ -73,7 +73,7 @@ const convertParametersValue = (searchItems: SearchItems[], relation: Map<string
7373
}
7474
});
7575

76-
return searchItems;
76+
return copySearchItems;
7777
};
7878
// relation: trial parameter -> type {conv_size -> number}
7979
const getTrialsBySearchFilters = (

0 commit comments

Comments
 (0)