kgabryje commented on code in PR #32004:
URL: https://github.com/apache/superset/pull/32004#discussion_r1935752919


##########
superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx:
##########
@@ -19,49 +19,38 @@
 
 import { useMemo, useState } from 'react';
 import { css, SupersetTheme, t } from '@superset-ui/core';
-import { Radio } from 'src/components/Radio';
+import { Radio, CheckboxOptionType } from 'src/components/Radio';
 import { DrillByType } from '../types';
 
 export const useDisplayModeToggle = () => {
   const [drillByDisplayMode, setDrillByDisplayMode] = useState<DrillByType>(
     DrillByType.Chart,
   );
-
+  const customButtons: CheckboxOptionType[] = [

Review Comment:
   please either wrap it in useMemo or move it out of the hook (it has only 
static values so should work fine) - otherwise it will trigger rerenders on 
every render cycle



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