Skip to content

Commit

Permalink
Merge pull request #1571 from lucasnetau/fix/1536
Browse files Browse the repository at this point in the history
Fix GH-1536 kc-toggle doesn't work with duplicated ids
  • Loading branch information
kevinchappell authored Jul 4, 2024
2 parents dc36397 + 69f33b7 commit f71b0b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/control/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default class controlSelect extends control {
const labelAttrs = { for: optionAttrs.id }
let output = [input, this.markup('label', labelContents, labelAttrs)]
if (toggle) {
delete labelAttrs.for
labelAttrs.className = 'kc-toggle'
labelContents.unshift(input, this.markup('span'))
output = this.markup('label', labelContents, labelAttrs)
Expand Down

0 comments on commit f71b0b4

Please sign in to comment.