bito-code-review[bot] commented on code in PR #35897:
URL: https://github.com/apache/superset/pull/35897#discussion_r2790697355


##########
superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx:
##########
@@ -320,6 +266,25 @@ export const FormattingPopoverContent = ({
   const [column, setColumn] = useState<string>(
     config?.column || columns[0]?.value,
   );
+  const visibleAllColumns = useMemo(
+    () => !!(allColumns && Array.isArray(allColumns) && allColumns.length),
+    [allColumns],
+  );
+
+  const [columnFormatting, setColumnFormatting] = useState<
+    string | ObjectFormattingEnum | undefined
+  >(

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Incorrect TypeScript type for columnFormatting</b></div>
   <div id="fix">
   
   The columnFormatting state type incorrectly includes ObjectFormattingEnum, 
but from the ConditionalFormattingConfig type, it should be string | undefined. 
This mismatch could lead to type errors. Update the state type, handler 
parameter, and onChange to use 'string | undefined' for consistency.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #1c3249</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
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