Skip to content

Commit 50586e1

Browse files
authored
Merge pull request #6 from VladimirIvanin/checkbox-click
убираем задваивание событий
2 parents 4ff2148 + 828aa21 commit 50586e1

File tree

1 file changed

+3
-9
lines changed
  • packages/vuetify/src/mixins/selectable

1 file changed

+3
-9
lines changed

packages/vuetify/src/mixins/selectable/index.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default mixins(
9292
if (!label) return label
9393

9494
// Label shouldn't cause the input to focus
95-
label!.onClick = prevent
95+
label!.onClick = this.onClick
9696

9797
return label
9898
},
@@ -116,14 +116,8 @@ export default mixins(
116116
})
117117
},
118118
onClick (e: Event) {
119-
// тут задваиваются клики
120-
const target = e.target as HTMLElement
121-
const isCurrentClick = target.id === this.computedId
122-
const isRippleClick = target.classList.contains('v-input--selection-controls__ripple')
123-
124-
if (isCurrentClick || isRippleClick || !this.computedId) {
125-
this.onChange();
126-
}
119+
e.preventDefault()
120+
this.onChange()
127121
this.$emit('click', e)
128122
},
129123
onChange () {

0 commit comments

Comments
 (0)