Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken reactivity ? How to remove item ? #7

Open
signmeuptwice opened this issue Oct 29, 2021 · 1 comment
Open

Broken reactivity ? How to remove item ? #7

signmeuptwice opened this issue Oct 29, 2021 · 1 comment

Comments

@signmeuptwice
Copy link

signmeuptwice commented Oct 29, 2021

Reactivity seems broken

if I splice the v-model list from the parent; the draggable component is not updated.

There is also no example of removing a list item in your example.

Only way I can get it to update is to use a v-if on <draggable> component with a long enough delay

Is a watcher missing on the v-model modelValue ?

watch: { modelValue() { if (this.modelValue){ this.list = this.modelValue } }, }

@Fanna1119
Copy link

Also running into this issue.

When using the following code on the example code.

const removeItem = (item) => {
  items1.value = items1.value.filter(i => i.value !== item)
}

it removes it from the

<pre>{{ JSON.stringify(items1, undefined, 4) }}</pre>

but the value stays on the draggable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants