SBIN2010 commented on code in PR #36338:
URL: https://github.com/apache/superset/pull/36338#discussion_r2574636082


##########
superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx:
##########
@@ -160,7 +167,9 @@ const renderOperator = ({
   const options =
     columnType === GenericDataType.String
       ? stringOperatorOptions
-      : operatorOptions;
+      : columnType === GenericDataType.Boolean
+        ? booleanOperatorOptions
+        : operatorOptions;

Review Comment:
   Can we simplify this design?



##########
superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx:
##########
@@ -307,7 +333,9 @@ export const FormattingPopoverContent = ({
       const defaultOperator =
         newColumnType === GenericDataType.String
           ? stringOperatorOptions[0].value
-          : operatorOptions[0].value;
+          : newColumnType === GenericDataType.Boolean
+            ? booleanOperatorOptions[0].value
+            : operatorOptions[0].value;

Review Comment:
   Same here, is it possible to simplify this design?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to