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:
parent
568a1a0015
commit
de6fd9472d
3 changed files with 61 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue