FrancescoCastaldi commented on code in PR #44945:
URL: https://github.com/apache/superset/pull/44945#discussion_r4256428490
##########
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx:
##########
@@ -95,7 +95,6 @@ export default function RadioButtonControl({
}`}
onClick={e => {
e.currentTarget?.focus();
Review Comment:
Addressed in commit 5fe83a1. Updated the onClick handler so that if
initialValue === undefined && val === currentValue (i.e. the displayed option
reflects an unsaved default), clicking it explicitly commits the default via
onChange(val). When initialValue is already persisted, clicking it remains a
no-op without redundant dispatches, and selecting a different option continues
to fire through Radio.Group.onChange exactly once. Added regression test
coverage in RadioButtonControl.test.tsx.
--
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]