Fix select rows issue

This commit is contained in:
CzBiX
2020-01-13 17:55:12 +08:00
parent b38681633e
commit 49fd9b379b

View File

@@ -412,9 +412,19 @@ export default Vue.extend({
filter() {
this.selectedRows = [];
},
// loading() {
// debugger;
// },
torrents(v) {
if (!this.hasSelected) {
return;
}
const torrentHashs = v.map(_.property('hash'));
const toRemove = _.difference(this.selectedHashes, torrentHashs);
if (!toRemove) {
return;
}
this.selectedRows = this.selectedRows.filter(r => !toRemove.includes(r.hash));
},
},
});
</script>