mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
editor improvements
This commit is contained in:
@@ -1,20 +1,9 @@
|
||||
<template>
|
||||
<v-table density="compact" v-if="ingredients.length > 0">
|
||||
|
||||
<template v-if="draggable">
|
||||
<draggable tag="tbody" v-model="mutable_ingredients" handle=".drag-handle" item-key="id">
|
||||
<template #item="{element}">
|
||||
<IngredientsTableRow :ingredient="element" :key="element.id" :show-notes="showNotes" :draggable="draggable"></IngredientsTableRow>
|
||||
</template>
|
||||
</draggable>
|
||||
</template>
|
||||
<template v-else>
|
||||
<tbody>
|
||||
<!-- TODO make into one condition so there is no duplicate code possibly by disabling dragging when not enabled?! -->
|
||||
<IngredientsTableRow v-for="i in ingredients" :ingredient="i" :key="i.id" :show-notes="showNotes" :draggable="draggable"></IngredientsTableRow>
|
||||
</tbody>
|
||||
</template>
|
||||
|
||||
<tbody>
|
||||
<IngredientsTableRow v-for="i in ingredients" :ingredient="i" :key="i.id" :show-notes="showNotes" :draggable="draggable"></IngredientsTableRow>
|
||||
</tbody>
|
||||
|
||||
</v-table>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user