mirror of https://github.com/Fabio286/antares.git
feat(UI): CTRL+A to select all result rows
This commit is contained in:
parent
c8594c0549
commit
4069ade36d
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue