fix: Misc Issues with Ingredient Parser (#6250)

This commit is contained in:
Michael Genson
2025-09-26 11:25:15 -05:00
committed by GitHub
parent f3cc51190c
commit 187e83eeb5
5 changed files with 58 additions and 27 deletions

View File

@@ -10,9 +10,7 @@
:max-width="maxWidth ?? undefined"
:content-class="top ? 'top-dialog' : undefined"
:fullscreen="$vuetify.display.xs"
@keydown.enter="() => {
emit('submit'); dialog = false;
}"
@keydown.enter="submitOnEnter"
@click:outside="emit('cancel')"
@keydown.esc="emit('cancel')"
>
@@ -127,6 +125,7 @@ interface DialogProps {
canDelete?: boolean;
canConfirm?: boolean;
canSubmit?: boolean;
disableSubmitOnEnter?: boolean;
}
interface DialogEmits {
@@ -150,6 +149,7 @@ const props = withDefaults(defineProps<DialogProps>(), {
canDelete: false,
canConfirm: false,
canSubmit: false,
disableSubmitOnEnter: false,
});
const emit = defineEmits<DialogEmits>();
@@ -181,6 +181,14 @@ function submitEvent() {
submitted.value = true;
}
function submitOnEnter() {
if (props.disableSubmitOnEnter) {
return;
}
submitEvent();
}
function deleteEvent() {
emit("delete");
submitted.value = true;