Skip to content

Computed Property on V-Model #246

@OAsik

Description

@OAsik

I'm writing about this issue again because you have closed my previous topic without hearing from me again. I have explicitly stated getter and setter on my computed prop as you have adviced, but below situation still remains as the same:

If draggable component populated from a computed prop, it doesn't work as intended. Drag animation works, but when the component is released, it is returned to its initial position immediately.

            <VueDraggable 
                :animation="300" 
                v-model="csniffdeck" 
                class="draggable_wrapper" 
                @end="onDeckPositionChange" 
            >
                <sniff-deck v-for="deck in csniffdeck" :key="deck.id"></sniff-deck>
            </VueDraggable>
        csniffdeck: {
            get() {
                return this.$store.getters["sniffdeck/sniffdeck"];
            },
            set(newVal) {
                this.shallowSniffdeck = newVal;
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions