Skip to content

Commit

Permalink
enh(files): added ability to escape out of all selection when focused
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
  • Loading branch information
emoral435 authored and susnux committed Dec 21, 2023
1 parent 5f7b82a commit dd772cc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
7 changes: 6 additions & 1 deletion apps/files/src/components/FileEntry/FileEntryCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
-
-->
<template>
<td class="files-list__row-checkbox">
<td class="files-list__row-checkbox"
@keyup.esc.exact="resetSelection">
<NcLoadingIcon v-if="isLoading" />
<NcCheckboxRadioSwitch v-else
:aria-label="t('files', 'Select the row for {displayName}', { displayName })"
Expand Down Expand Up @@ -125,6 +126,10 @@ export default Vue.extend({
this.selectionStore.setLastIndex(newSelectedIndex)
},
resetSelection() {
this.selectionStore.reset()
},
t,
},
})
Expand Down
7 changes: 6 additions & 1 deletion apps/files/src/components/FilesListTableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
-->
<template>
<tr class="files-list__row-head">
<th class="files-list__column files-list__row-checkbox">
<th class="files-list__column files-list__row-checkbox"
@keyup.esc.exact="resetSelection">
<NcCheckboxRadioSwitch v-bind="selectAllBind" @update:checked="onToggleAll" />
</th>

Expand Down Expand Up @@ -204,6 +205,10 @@ export default Vue.extend({
}
},
resetSelection() {
this.selectionStore.reset()
},
t: translate,
},
})
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit dd772cc

Please sign in to comment.