Skip to content

Commit

Permalink
fix: remove label's for attribute when we wrap the input with the lab…
Browse files Browse the repository at this point in the history
…el for kc-toggle
  • Loading branch information
lucasnetau committed Jul 1, 2024
1 parent c180c9f commit 69f33b7
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 69f33b7

Please sign in to comment.