sadpandajoe commented on code in PR #44945:
URL: https://github.com/apache/superset/pull/44945#discussion_r4270346672


##########
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx:
##########
@@ -95,7 +104,9 @@ export default function RadioButtonControl({
                   }`}
                   onClick={e => {
                     e.currentTarget?.focus();
-                    onChange(val);
+                    if (isUnpersistedDefault && val === currentValue) {

Review Comment:
   Clicking the already-selected option is now a no-op whenever a value is 
persisted, and that drops a gesture `ZoomConfigControl` relied on. In 
Cartodiagram's chart size control, with `FIXED` selected, dragging a single 
zoom-level bar changes `values` but leaves `type` as `FIXED`. Previously 
clicking `FIXED` again ran `onShapeChange` and rebuilt the uniform sizes from 
the base width/height; now `initialValue='FIXED'` makes this guard false and 
the Group doesn't re-fire for an unchanged selection, so the only way back is 
to switch shapes and return. The same applies if `ControlFormItem`'s local 
`value` drifts from the incoming prop (it is only seeded once), since the 
highlighted option can't be re-clicked to restore it. Is losing the re-apply on 
click intended for the shape control, or should it keep a way to re-apply the 
selected shape?



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