msyavuz commented on code in PR #35067:
URL: https://github.com/apache/superset/pull/35067#discussion_r2356159231


##########
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/matrixifyControls.tsx:
##########
@@ -82,24 +92,47 @@ const matrixifyControls: Record<string, 
SharedControlConfig<any>> = {};
       const getValue = (key: string, defaultValue?: any) =>
         form_data?.[key] ?? controls?.[key]?.value ?? defaultValue;
 
+      const selectionMode = getValue(
+        `matrixify_dimension_selection_mode_${axis}`,
+        'members',
+      );
+
+      const isVisible =
+        controls?.[
+          `matrixify_enable_${axis === 'rows' ? 'vertical' : 
'horizontal'}_layout`
+        ]?.value === true &&
+        controls?.[`matrixify_mode_${axis}`]?.value === 'dimensions';
+
+      // Validate dimension is selected when visible
+      const dimensionValidator = (value: any) => {
+        if (!value?.dimension) {

Review Comment:
   I don't think there is a good way to avoid this one



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to