From e340fa2b19b103a2c41c7fb1efc979bcd427e4c8 Mon Sep 17 00:00:00 2001 From: Lingyun Zhao <33519183+lingyun1010@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:58:41 +0000 Subject: [PATCH] Replace lodash function with JS function (#370) --- .../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={