Hello
I have a problem when working with Data Inspector.
I cant understand, how does diagram Data upgrades after changes? Because code of Inspector hast any events or links between diagram and Inspector window.
I have the problem because I rewrite Inspector from manual according to my data model
new go.Binding("text", "value", function(v,obj){if (obj.Panel.checkbox)return v else return ''}))
Data Inspector has only transaction between Inspector and DIV “SavedModel”. In my case in DIV “SavedModel” data successfully is upgraded but in diagramm - not.
Given your data, your Binding doesn’t look right. Do you have this Binding as well?
new go.Binding("itemArray", "mainProp")
Assuming that your binding is on a TextBlock that is an element of that Panel’s Panel.itemTemplate, I would think this would work:
new go.Binding("text", "value", function(v, obj) { return obj.Panel.data.checkbox ? v : ""; })
Remember that you don’t have to use the Data Inspector. It’s just a convenience to show data properties in your page, but you could implement everything in HTML and whatever JavaScript framework you want to use (or no framework at all).
I use Inspector to show all object properties, end display they on Diagram depending on the value checkbox.
I can t understand, how does diagram Data upgrades after changes?
Whenever you want to make a change to a model, you have to call Model methods to do so. And you should do so within a transaction. However when initializing a model before assigning Diagram.model, no transaction is necessary.
I have no idea. Look at the examples to see if there’s anything different.
Are you sure that the data being inspected is in fact in the Diagram.model? I guess if the node is appearing correctly, it should be, but it’s possible that you have a copy of the data if you are using an immutable external model, as is typical in a React app.