carbon-design-system / carbon-components-svelte

Svelte implementation of the Carbon Design System
https://svelte.carbondesignsystem.com
Apache License 2.0
2.71k stars 261 forks source link

Update checked for radio buttons without group. #1880

Open brunnerh opened 10 months ago

brunnerh commented 10 months ago

Also make radio button group name a required property (can change this again, if there is a good reason not to do this).

Unfortunately the change event does only fire for the newly selected radio button, not for the ones that are automatically unselected; this is why I used document.getElementsByName to find the associated ones.

Fixes #1879.

brunnerh commented 10 months ago

Also make radio button group name a required property (can change this again, if there is a good reason not to do this).

The skeleton UIs might be a good reason 🤔.

<RadioButtonGroup legendText="Storage tier (disk)" name="skeleton">
  <RadioButtonSkeleton />
  <RadioButtonSkeleton />
  <RadioButtonSkeleton />
</RadioButtonGroup>