feat(UI): CTRL+A to select all result rows

This commit is contained in:
Fabio Di Stasio 2021-10-16 09:58:32 +02:00
parent c8594c0549
commit 4069ade36d
1 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,8 @@
tabindex="0"
:style="{'height': resultsSize+'px'}"
@keyup.46="showDeleteConfirmModal"
@keydown.ctrl.65="selectAllRows"
@keydown.esc="deselectRows"
>
<TableContext
v-if="isContext"
@ -448,6 +450,16 @@ export default {
else
this.selectedRows = [row];
},
selectAllRows () {
console.log('select all');
this.selectedRows = this.localResults.reduce((acc, curr) => {
acc.push(curr._id);
return acc;
}, []);
},
deselectRows () {
this.selectedRows = [];
},
contextMenu (event, cell) {
if (event.target.localName === 'input') return;