Skip to content

Commit

Permalink
fix(Checkbox): @change event value (#1580)
Browse files Browse the repository at this point in the history
Co-authored-by: Romain Hamel <rom.hml@gmail.com>
  • Loading branch information
simoncdn and romhml committed Mar 28, 2024
1 parent 49b73aa commit c98d6e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/data/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ export default defineComponent({
})
}
function onChange (event: any) {
if (event.target.checked) {
function onChange (checked: boolean) {
if (checked) {
selectAllRows()
} else {
selected.value = []
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/forms/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default defineComponent({
})
const onChange = (event: Event) => {
emit('change', (event.target as HTMLInputElement).value)
emit('change', (event.target as HTMLInputElement).checked)
emitFormChange()
}
Expand Down

0 comments on commit c98d6e3

Please sign in to comment.