updateData() can be wrongly ignored if you pass the same data object
happybeing opened this issue · 0 comments
happybeing commented
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 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);
}