fix: resetEmptyTitleError (#2889)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2889 Reviewed-by: konrad <k@knt.li> Co-authored-by: Dominik Pschenitschni <mail@celement.de> Co-committed-by: Dominik Pschenitschni <mail@celement.de>
This commit is contained in:
parent
e8a07fc8e0
commit
07df606c68
@ -13,7 +13,7 @@
|
||||
:class="{'textarea-empty': newTaskTitle === ''}"
|
||||
:placeholder="$t('project.list.addPlaceholder')"
|
||||
rows="1"
|
||||
@keyup="resetEmptyTitleError"
|
||||
@keydown="resetEmptyTitleError"
|
||||
@keydown.enter="handleEnter"
|
||||
/>
|
||||
<span class="icon is-small is-left">
|
||||
@ -99,13 +99,10 @@ const taskAddHovered = useElementHover(taskAdd)
|
||||
|
||||
const errorMessage = ref('')
|
||||
|
||||
function resetEmptyTitleError(e: KeyboardEvent) {
|
||||
if (
|
||||
(e.which <= 90 && e.which >= 48 || e.which >= 96 && e.which <= 105)
|
||||
&& newTaskTitle.value !== ''
|
||||
) {
|
||||
errorMessage.value = ''
|
||||
}
|
||||
function resetEmptyTitleError() {
|
||||
if (!newTaskTitle.value) {
|
||||
errorMessage.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
const loading = computed(() => taskStore.isLoading)
|
||||
|
Loading…
x
Reference in New Issue
Block a user