Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
enh(files): added ability to escape out of all selection when focused
Signed-off-by: Eduardo Morales <[email protected]>
  • Loading branch information
emoral435 committed Dec 21, 2023
commit e1940ba36846bd7010f77fae4e3a124d673b8e9b
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.