scinote-web/app/javascript/vue/shared/datatable/mixins/card_selector.js
2023-12-01 09:56:14 +01:00

17 lines
423 B
JavaScript

export default {
methods: {
itemSelected() {
let item = this.dtComponent.selectedRows.find((item) => {
return item.id == this.params.id;
});
if (item) {
this.dtComponent.selectedRows = this.dtComponent.selectedRows.filter((item) => {
return item.id != this.params.id;
});
} else {
this.dtComponent.selectedRows.push(this.params);
}
}
}
}