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"
|
tabindex="0"
|
||||||
:style="{'height': resultsSize+'px'}"
|
:style="{'height': resultsSize+'px'}"
|
||||||
@keyup.46="showDeleteConfirmModal"
|
@keyup.46="showDeleteConfirmModal"
|
||||||
|
@keydown.ctrl.65="selectAllRows"
|
||||||
|
@keydown.esc="deselectRows"
|
||||||
>
|
>
|
||||||
<TableContext
|
<TableContext
|
||||||
v-if="isContext"
|
v-if="isContext"
|
||||||
|
@ -448,6 +450,16 @@ export default {
|
||||||
else
|
else
|
||||||
this.selectedRows = [row];
|
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) {
|
contextMenu (event, cell) {
|
||||||
if (event.target.localName === 'input') return;
|
if (event.target.localName === 'input') return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue