Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.1k stars 4.95k forks source link

Unclear radio button group usage #6905

Closed aidv closed 4 years ago

aidv commented 4 years ago

Changing radio button name breaks the group

Use the format: [Component] Component Should Do X i.e. [Checkbox] onChange Should Fire When Update Triggered via DOM

Steps

Running the following code works `

                    </div>`

Changing the value name= to anything other than example2 breaks the group and the other radio buttons in the same group won't uncheck.

Reason to that is that the value name= MUST BE THE SAME across all radio buttons in the same group.

VanquishedWombat commented 4 years ago

What you observe is standard HTML 4+ (so back to the 90's) behaviour. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox and scroll to the 'Handling multiple checkboxes' section to see an explanation. You have raised this as an issue - IMHO it could be reasonable to consider withdrawing it as it is an issue of knowledge, not of SUI.