mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 13:35:23 +02:00
Merge branch 'mealie-next' into feat/dont-build-nightly-for-docs
This commit is contained in:
commit
38125fa362
2 changed files with 15 additions and 1 deletions
|
@ -25,6 +25,7 @@
|
||||||
:label="$t('shopping-list.note')"
|
:label="$t('shopping-list.note')"
|
||||||
rows="1"
|
rows="1"
|
||||||
auto-grow
|
auto-grow
|
||||||
|
@keypress="handleNoteKeyPress"
|
||||||
></v-textarea>
|
></v-textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-end" style="gap: 20px">
|
<div class="d-flex align-end" style="gap: 20px">
|
||||||
|
@ -142,5 +143,14 @@ export default defineComponent({
|
||||||
listItem,
|
listItem,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
handleNoteKeyPress(event) {
|
||||||
|
// Save on Enter
|
||||||
|
if (!event.shiftKey && event.key === "Enter") {
|
||||||
|
event.preventDefault();
|
||||||
|
this.$emit("save");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -665,6 +665,11 @@ export default defineComponent({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!createListItemData.value.foodId && !createListItemData.value.note) {
|
||||||
|
// don't create an empty item
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
loadingCounter.value += 1;
|
loadingCounter.value += 1;
|
||||||
|
|
||||||
// make sure it's inserted into the end of the list, which may have been updated
|
// make sure it's inserted into the end of the list, which may have been updated
|
||||||
|
@ -676,7 +681,6 @@ export default defineComponent({
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
createListItemData.value = listItemFactory(createListItemData.value.isFood || false);
|
createListItemData.value = listItemFactory(createListItemData.value.isFood || false);
|
||||||
createEditorOpen.value = false;
|
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue