Skip to content

Commit

Permalink
No longer send the checkbox event
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 13, 2024
1 parent a1a9a8f commit a05c26d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion panel/src/components/Collection/Items.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
@drag="onDragStart($event, item.dragText)"
@mouseover.native="$emit('hover', $event, item, itemIndex)"
@option="onOption($event, item, itemIndex)"
@select="onSelect($event, item, itemIndex)"
@select="onSelect(item, itemIndex)"
>
<template #options>
<slot name="options" v-bind="{ item, index: itemIndex }" />
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Layout/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<label class="k-table-index-checkbox">
<input
type="checkbox"
@change="$emit('select', $event, row, rowIndex)"
@change="$emit('select', row, rowIndex)"
/>
</label>
</template>
Expand Down
8 changes: 4 additions & 4 deletions panel/src/components/Sections/ModelsSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ export default {
this.searching = !this.searching;
this.searchterm = null;
},
onSelect(event, item) {
if (event.target.checked) {
this.selected.push(item);
} else {
onSelect(item) {
if (this.selected.includes(item)) {
this.selected = this.selected.filter(
(selected) => selected.id !== item.id
);
} else {
this.selected.push(item);
}
},
onSelectToggle() {
Expand Down

0 comments on commit a05c26d

Please sign in to comment.