1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 07:39:41 +02:00

Feature/collapse recipe sections (#1021)

* toggle hide recipe sections

* disable parser if food or units is defined

* make inputs clearable

* remove console.logs

* fix linter error

* fix linter errors
This commit is contained in:
Hayden 2022-03-03 19:43:56 -09:00 committed by GitHub
parent 568a1a0015
commit de6fd9472d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 9 deletions

View file

@ -44,6 +44,7 @@
item-text="name"
class="mx-1"
placeholder="Choose Unit"
clearable
@keyup.enter="handleUnitEnter"
>
<template #no-data>
@ -70,6 +71,7 @@
item-text="name"
class="mx-1 py-0"
placeholder="Choose Food"
clearable
@keyup.enter="handleFoodEnter"
>
<template #no-data>
@ -165,15 +167,12 @@ export default defineComponent({
function handleUnitEnter() {
if (value.unit === undefined || value.unit === null || !value.unit.name.includes(unitSearch.value)) {
console.log("Creating");
createAssignUnit();
}
}
function handleFoodEnter() {
console.log(value.food);
if (value.food === undefined || value.food === null || !value.food.name.includes(foodSearch.value)) {
console.log("Creating");
createAssignFood();
}
}