This is an automated email from the ASF dual-hosted git repository. enzomartellucci pushed a commit to branch refactor/antd5-radio in repository https://gitbox.apache.org/repos/asf/superset.git
commit 4ee62faee1d815633600c6aa078f8b705c8c9ed1 Author: Enzo Martellucci <[email protected]> AuthorDate: Sat Jan 25 21:32:32 2025 +0100 refactor(HeaderWithRadioGroup): Implements Radio.Group from Antd5 --- .../Table/header-renderers/HeaderWithRadioGroup.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx b/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx index b80d5445f5..352f0f807f 100644 --- a/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx +++ b/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx @@ -19,10 +19,8 @@ import { useState } from 'react'; import { css, useTheme } from '@superset-ui/core'; import { Radio } from 'src/components/Radio'; -import { Space } from 'src/components/Space'; import Icons from 'src/components/Icons'; import Popover from 'src/components/Popover'; - export interface HeaderWithRadioGroupProps { headerTitle: string; groupTitle: string; @@ -56,21 +54,14 @@ function HeaderWithRadioGroup(props: HeaderWithRadioGroupProps) { > {groupTitle} </div> - <Radio.Group + <Radio.VerticalGroup value={value} onChange={e => { onChange(e.target.value); setPopoverVisible(false); }} - > - <Space direction="vertical"> - {groupOptions.map(option => ( - <Radio key={option.value} value={option.value}> - {option.label} - </Radio> - ))} - </Space> - </Radio.Group> + options={groupOptions} + /> </div> } placement="bottomLeft"
