mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
fix drag and drop on recipe instructions
This commit is contained in:
parent
274c3efdd1
commit
d6b8f03c5b
1 changed files with 6 additions and 9 deletions
|
@ -130,11 +130,10 @@
|
|||
ghostClass: 'ghost',
|
||||
}"
|
||||
@start="drag = true"
|
||||
@end="drag = false"
|
||||
@end="onDragEnd"
|
||||
>
|
||||
<TransitionGroup
|
||||
type="transition"
|
||||
:name="!drag ? 'flip-list' : ''"
|
||||
>
|
||||
<div
|
||||
v-for="(step, index) in instructionList"
|
||||
|
@ -512,13 +511,10 @@ export default defineNuxtComponent({
|
|||
{ deep: true },
|
||||
);
|
||||
|
||||
watch(
|
||||
instructionList,
|
||||
(newVal) => {
|
||||
context.emit("update:modelValue", [...newVal]);
|
||||
},
|
||||
{ deep: true },
|
||||
);
|
||||
function onDragEnd() {
|
||||
context.emit("update:modelValue", [...instructionList.value]);
|
||||
drag.value = false;
|
||||
}
|
||||
|
||||
// ===============================================================
|
||||
// Ingredient Linker
|
||||
|
@ -784,6 +780,7 @@ export default defineNuxtComponent({
|
|||
loadingStates,
|
||||
|
||||
// Rest
|
||||
onDragEnd,
|
||||
drag,
|
||||
togglePreviewState,
|
||||
toggleCollapseSection,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue