Add ability to select all on desktop (#12044)

* Add ability to select all review items

* Refactor keybaord listener
This commit is contained in:
Nicolas Mowen
2024-06-18 08:32:17 -06:00
committed by GitHub
parent 4bca405e29
commit e6790d9a6a
6 changed files with 64 additions and 29 deletions

View File

@@ -49,8 +49,14 @@ export default function ExportCard({
useKeyboardListener(
editName != undefined ? ["Enter"] : [],
(_, down, repeat) => {
if (down && !repeat && editName && editName.update.length > 0) {
(key, modifiers) => {
if (
key == "Enter" &&
modifiers.down &&
!modifiers.repeat &&
editName &&
editName.update.length > 0
) {
onRename(exportedRecording.id, editName.update);
setEditName(undefined);
}