voyager
voyager copied to clipboard
updateData() can be wrongly ignored if you pass the same data object
Please:
- [x] Check for duplicate issues
- [x] 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
someDataobject is different from that in the precedingupdateData(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);
}