mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	fix: Misc Issues with Ingredient Parser (#6250)
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user