Data Inspector Go JS and Interactions between Inspector and Diagram

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

{ key: 1, "Alpha", color: "#B2DFDB", state: "one" , mainProp: [{nameProp:'FirstName',value:'Green',checkbox:'true'},{nameProp:'SecondName',value:'Bob',checkbox:'false'}]}

to show information on diagram i use next code

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).

Yes, I use It code

new go.Binding("itemArray", "mainProp")

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.

But I can`t understand why my Diagram data not updated…

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.

the Diagram data in the chart is not updated if I change the checkbox values in mainprop ,

{ key: 1, "Alpha", color: "#B2DFDB", state: "one" , mainProp: [{nameProp:'FirstName',value:'Green',checkbox:'true'},{nameProp:'SecondName',value:'Bob',checkbox:'false'}]}

but as soon as I change the values from for example color, both this value and the ones I changed before(FirstName) in mainprop are updated

What’s your itemTemplate?

   myDiagram.nodeTemplate =
        $(go.Node, "Vertical",
  
          $(go.Panel, "Auto",
              
                     
                $(go.Panel, "Vertical",
                  {
                    padding: 2,                    
                    background: "white",  
                    defaultAlignment: go.Spot.Left,  
                    itemTemplate: actionTemplate
                  },
                  new go.Binding("itemArray", "mainProp")  
              
               
            )  
          ),  

        );

OK, but that doesn’t really matter, does it?