From 2124e94cd1d2ee256177cef066dc7b146f8c4821 Mon Sep 17 00:00:00 2001 From: mkaliberda Date: Sat, 21 Sep 2024 21:36:06 -0700 Subject: [PATCH] [SDL-5641][UI] Fixed issue with selection sensor columns from max transform in sensor fusion feature generator (#27) --- .../FormAutoMLFeaturesFormAdd.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/src/containers/BuildModel/componets/PipelineFormStepsFactory/FormAutoMLFeaturesFormAdd.jsx b/src/ui/src/containers/BuildModel/componets/PipelineFormStepsFactory/FormAutoMLFeaturesFormAdd.jsx index 387401b5..592f0cec 100644 --- a/src/ui/src/containers/BuildModel/componets/PipelineFormStepsFactory/FormAutoMLFeaturesFormAdd.jsx +++ b/src/ui/src/containers/BuildModel/componets/PipelineFormStepsFactory/FormAutoMLFeaturesFormAdd.jsx @@ -17,7 +17,7 @@ You should have received a copy of the GNU Affero General Public License along with SensiML Piccolo AI. If not, see . */ -import React, { useState, useCallback, useEffect } from "react"; +import React, { useState, useCallback, useEffect, useMemo } from "react"; import _ from "lodash"; import PropTypes from "prop-types"; import { useTranslation } from "react-i18next"; @@ -62,6 +62,10 @@ const FormAutoMLFeaturesFormAdd = ({ return res; }; + const queryColumnOptions = useMemo(() => { + return queryColumns.map((column) => ({ name: column, value: column })); + }, [queryColumns]); + const getInputContractParameters = useCallback( (el) => { if (featuresParameters && featuresParameters[el.parent]) { @@ -166,7 +170,7 @@ const FormAutoMLFeaturesFormAdd = ({ name="queryColumns" id="queryColumnsId" label="Default Columns" - options={queryColumns.map((column) => ({ name: column, value: column }))} + options={queryColumnOptions} defaultValue={queryColumns} onChange={handeChangeDefaultColumns} />