Hi Observablers!
I am working on a proof-of-concept data application, and trying to find a way to mock up a representation of changing a data source (showing, e.g. changes between projecct1 and project1).
I have defined three datasets: original_data (e.g. project1), state_data (current view), and changed_data (e.g. project2).
I have also defined button inputs to load the different datasets, e.g.:
viewof load_state_data = Inputs.button("Load Original Data");
and
write_original_data = {
if (load_state_data) {
Object.assign(state_data, original_data);
}
state_data;
};
When I click the button, if I go back to ‘state_data’ and click the down arrow icon to explore data, I can see that the values change on click … but not until I interact with the Inspector view. Also, if I show just a value in the dataset, like state_data.name
, the representation of that attribute doesn’t ever seem to change.
Any suggestions for how I should adjust my approach?
Notebook is here: Data Mutation - Check / Aaron Kyle Dennis | Observable