#6911 save on enter #207

Merged
jsegarra merged 50 commits from 6911-saveOnEnter into dev 2024-06-07 07:20:48 +00:00
1 changed files with 9 additions and 2 deletions
Showing only changes of commit 5139bba5a0 - Show all commits

View File

@ -20,7 +20,14 @@ const state = useState();
const currentUser = ref(state.getUser());
const newNote = ref('');
const vnPaginateRef = ref();
function handleKeyUp(event) {
jsegarra marked this conversation as resolved
Review
    if (event.key === 'Enter') {
        event.preventDefault();
        if (!event.shiftKey) insert();
    }
``` if (event.key === 'Enter') { event.preventDefault(); if (!event.shiftKey) insert(); } ```
if (event.key === 'Enter' && event.shiftKey) {
event.preventDefault();
} else if (event.key === 'Enter') {
insert();
event.preventDefault();
}
}
async function insert() {
const body = $props.body;
Object.assign(body, { text: newNote.value });
@ -48,7 +55,7 @@ async function insert() {
size="lg"
autogrow
Outdated
Review

Cambiar traduccion

Cambiar traduccion
https://gitea.verdnatura.es/verdnatura/salix-front/commit/492e333d2fdb4aaa1d903f5b1f21d78e6641889f
autofocus
@keyup.enter.stop="insert"
@keyup="handleKeyUp"
clearable
>
<template #append>