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

update method is not reactive #1015

Open
alexdeia opened this issue Mar 1, 2023 · 0 comments
Open

update method is not reactive #1015

alexdeia opened this issue Mar 1, 2023 · 0 comments

Comments

@alexdeia
Copy link

alexdeia commented Mar 1, 2023

Hello. The second issue which I found. This issue is related to the timeline. See original visjs/vis-timeline#1562 (comment)

If you want to update items in real-time on the timeline, you can't to do this by update method.

For example. This code updates group but not reactively. Timelines will remain unchanged

const task = this.getTask(taskId)

task.group = newGroupId

// tasks.updateOnly(task) - doesn't work at all. See https://github.com/visjs/vis-data/issues/1014
tasks.update(task)

But if you use add/remove like this then behaviour will be expected: timeline items will be updated in real-time

const task = this.getTask(taskId)

tasks.remove(task)

task.group = newGroupId

tasks.add(task)
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

1 participant