Skip to content

Commit e1940ba

Browse files
committed
enh(files): added ability to escape out of all selection when focused
Signed-off-by: Eduardo Morales <[email protected]>
1 parent 73aeaa1 commit e1940ba

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

apps/files/src/components/FileEntry/FileEntryCheckbox.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
-
2121
-->
2222
<template>
23-
<td class="files-list__row-checkbox">
23+
<td class="files-list__row-checkbox"
24+
@keyup.esc.exact="resetSelection">
2425
<NcLoadingIcon v-if="isLoading" />
2526
<NcCheckboxRadioSwitch v-else
2627
:aria-label="t('files', 'Select the row for {displayName}', { displayName })"
@@ -125,6 +126,10 @@ export default Vue.extend({
125126
this.selectionStore.setLastIndex(newSelectedIndex)
126127
},
127128
129+
resetSelection() {
130+
this.selectionStore.reset()
131+
},
132+
128133
t,
129134
},
130135
})

apps/files/src/components/FilesListTableHeader.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
-->
2222
<template>
2323
<tr class="files-list__row-head">
24-
<th class="files-list__column files-list__row-checkbox">
24+
<th class="files-list__column files-list__row-checkbox"
25+
@keyup.esc.exact="resetSelection">
2526
<NcCheckboxRadioSwitch v-bind="selectAllBind" @update:checked="onToggleAll" />
2627
</th>
2728

@@ -204,6 +205,10 @@ export default Vue.extend({
204205
}
205206
},
206207
208+
resetSelection() {
209+
this.selectionStore.reset()
210+
},
211+
207212
t: translate,
208213
},
209214
})

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)