RadioButtonControl calls onChange twice per selection (Radio.Group onChange plus a per-button onClick)
Maintainers usually reply within 1 day
@FrancescoCastaldi is already working on this.
Since Oct 3, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start in superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx, especially the Radio.Group handler at L72-L75 and each Radio.Button's onClick at L96-L99. Review the React Testing Library coverage for Explore controls, then preserve focus behavior while ensuring the control invokes onChange only once for an actual selection change and not for the selected option.
Written by the indexing model from the issue text.
Description
Bug description
RadioButtonControl wires the change in two places: Radio.Group onChange and an onClick on every Radio.Button. Selecting a different option fires both, so onChange runs at least twice with the same value (the click can also reach the handler via both the label and the inner input). Clicking the already-selected button also fires onChange through onClick even though nothing changed. Controls that dispatch on change (control panel, ColumnConfig form items, MapView/ZoomConfig mode switches) therefore dispatch duplicate updates.
Steps to reproduce: render RadioButtonControl with an onChange spy and click an unselected option: the spy is called more than once. Click the selected option: the spy is still called.
Expected: one call per actual change.
Where
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx
- L72-L75
<Radio.Group value={currentValue} onChange={e => onChange(e.target.value)}> - L96-L99
onClick={e => { e.currentTarget?.focus(); onChange(val); }}
(VerticalRadioControl.tsx only uses the Group onChange, so it is not affected.)
Suggested fix
Keep only the Radio.Group onChange; move the focus() call into a click handler that does not call onChange.
Found by
Found while adding React Testing Library coverage for Explore controls (all line numbers are against master at bc3698b5d6).
- Dominant language
- Python
- Stars
- 75.2k
- Forks
- 18.5k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 608
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/superset
-
Table chart: search box no longer shows the number of records (7.0.0rc2)Possibly taken @SBIN2010 claimed this today. Open#bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/superset#45494 · 1 reaction ·
Maintainers usually reply within 1 day
-
Bar chart: bars on a temporal x-axis shrink to hairlines when the time grain is finer than the data (7.0.0rc2)Possibly taken A pull request linked to this issue is open or already merged. Open#bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[MCP] BrowserHelloMiddleware (welcome page to MCP) intercepts every browser GET, breaking OAuth flows of MCP_AUTH_FACTORYPossibly taken @MikolajBalcerek claimed this 4 days ago. Open#bug 🦾 ai-candidate
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/superset#45390 · 1 comment ·
Maintainers usually reply within 1 day
-
get_time_filter Jinja macro returns 500 when the chart has a custom SQL filterPossibly taken @SEPURI-SAI-KRISHNA claimed this 6 days ago. Open🦾 ai-candidate
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/superset#45269 · 1 comment ·
Maintainers usually reply within 1 day
-
Nightly full-repo pre-commit fails: mypy Filter|OrFilter narrowing gaps in semantic-layer testsPossibly taken @sadpandajoe claimed this 6 days ago. Openai:fix-master
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
idxmax/idxmin raise ValueError when a single partition is all-NAPossibly taken @Jason10191019999 claimed this today. Openneeds triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
[BUG]: Windows GUI package of v1.17.0-rc3 has no GTK DLLsPossibly taken @andrut-ds claimed this today. Openbug CI/CD Pactus-GUI Windows
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pactus-project/pactus#2428 ·
Maintainers usually reply within 1 day
-
DiskDataset.reshard() can hang with a zero or negative shard sizePossibly taken @Programmer-Develops claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 19 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
GNS3/gns3-server#3017 · 1 comment ·
Maintainers usually reply within 1 day