From 4008b194177af0a9e6e11b6d512893d01ca0e346 Mon Sep 17 00:00:00 2001 From: lingyun1010 Date: Fri, 17 Nov 2023 14:05:57 +0000 Subject: [PATCH] Replace lodash function with JS function --- .../bundles/experiment-page/src/TSnePlotViewRoute.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/javascript/bundles/experiment-page/src/TSnePlotViewRoute.js b/app/src/main/javascript/bundles/experiment-page/src/TSnePlotViewRoute.js index e65eb2a4f..0d5a6f4f1 100644 --- a/app/src/main/javascript/bundles/experiment-page/src/TSnePlotViewRoute.js +++ b/app/src/main/javascript/bundles/experiment-page/src/TSnePlotViewRoute.js @@ -105,11 +105,11 @@ class TSnePlotViewRoute extends React.Component { plotTypeDropdown={plotTypeDropdown} selectedPlotOptionLabel={search.plotOption ? search.plotType ? - Object.keys(_find(plotTypeDropdown, - (plot) => plot.plotType.toLowerCase() === search.plotType).plotOptions[0])[0] + `: ` + search.plotOption + Object.keys(plotTypeDropdown[plotTypeDropdown.findIndex( + (plot) => plot.plotType.toLowerCase() === search.plotType.toLowerCase())].plotOptions[0])[0] + `: ` + search.plotOption : - Object.keys(_find(plotTypeDropdown, - (plot) => plot.plotType.toLowerCase() === this.state.selectedPlotType).plotOptions[0])[0] + `: ` + search.plotOption + Object.keys(plotTypeDropdown[plotTypeDropdown.findIndex( + (plot) => plot.plotType.toLowerCase() === this.state.selectedPlotType.toLowerCase())].plotOptions[0])[0] + `: ` + search.plotOption : this.state.selectedPlotOptionLabel} onChangePlotTypes={