Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silent-cameras-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': patch
---

**radio**: radio can not be unselected
11 changes: 2 additions & 9 deletions packages/core/src/components/bal-radio/bal-radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,6 @@ export class Radio implements ComponentInterface, BalElementStateInfo, Loggable,
this.checked = newChecked
}
}

// if (this.radioButton) {
// this.buttonTabindex = -1

// if (this.radioButton.setChecked) {
// this.radioButton.setChecked(this.checked)
// }
// }
}

/**
Expand Down Expand Up @@ -384,7 +376,8 @@ export class Radio implements ComponentInterface, BalElementStateInfo, Loggable,
ev.preventDefault()

this.setFocus()
this.setChecked(!this.checked)
this.checked = true
this.setChecked(this.checked)
}

private onClick = (ev: MouseEvent) => {
Expand Down
Loading