From 7f833e9e29b8df5023709f7238d2c9bccdde489c Mon Sep 17 00:00:00 2001 From: Ilia Znamenskii Date: Wed, 30 Oct 2024 16:46:23 +0100 Subject: [PATCH] use faeture flags when hide form control --- app/client/src/pages/Editor/FormControl.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/client/src/pages/Editor/FormControl.tsx b/app/client/src/pages/Editor/FormControl.tsx index 453696742e3..0360530c3d0 100644 --- a/app/client/src/pages/Editor/FormControl.tsx +++ b/app/client/src/pages/Editor/FormControl.tsx @@ -31,6 +31,7 @@ import TemplateMenu from "PluginActionEditor/components/PluginActionForm/compone import { SQL_DATASOURCES } from "constants/QueryEditorConstants"; import type { Datasource, DatasourceStructure } from "entities/Datasource"; import { getCurrentEditingEnvironmentId } from "ee/selectors/environmentSelectors"; +import { selectFeatureFlags } from "ee/selectors/featureFlagsSelectors"; export interface FormControlProps { config: ControlProps; @@ -48,6 +49,7 @@ function FormControl(props: FormControlProps) { const dispatch = useDispatch(); const currentEditingEnvId = useSelector(getCurrentEditingEnvironmentId); + const featureFlags = useSelector(selectFeatureFlags); // adding this to prevent excessive rerendering const [convertFormToRaw, setConvertFormToRaw] = useState(false); @@ -60,7 +62,11 @@ function FormControl(props: FormControlProps) { .datasourceStorages[currentEditingEnvId]; } - const hidden = isHidden(formValueForEvaluatingHiddenObj, props.config.hidden); + const hidden = isHidden( + formValueForEvaluatingHiddenObj, + props.config.hidden, + featureFlags, + ); const configErrors: EvaluationError[] = useSelector( (state: AppState) => getConfigErrors(state, {