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

updateData() can be wrongly ignored if you pass the same data object #846

Open
2 tasks done
happybeing opened this issue Feb 18, 2020 · 0 comments
Open
2 tasks done

Comments

@happybeing
Copy link

Please:

  • Check for duplicate issues
  • Describe how to reproduce the bug / the goal of the new feature request

If you call voyagerInstance.updateData(someData) Voyager loads the data. If you repeat the call again with the same someData object nothing happens even if:

  • a different dataset has been loaded into Voyager via the 'Change' button in the Voyager UI
  • the data in the someData object is different from that in the preceding updateData(someData)

Workaround:
Copy the someData to a new object before calling updateData(), for example:

const someData = { values: [...] };

function handleLoadButton () {
  // This works whether someData.values has changed or not
  const datatoload = { "values": [...someData.values] };
   voyagerInstance.updateData(datatoload);
}
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