Shapes templates not loading, when trying to load palette dynamically on runtime

Hi Team,

I am trying to load left palette dynamically on runtime,
My palette.model.nodeDataArray is updated with new nodes, but shape templates are not loading
During page load

at run time

Here is how I am updating:

palette.model = go.Model.fromJson(JSON.stringify({ class: “go.GraphLinksModel”, nodeDataArray: updatedNodes }));

palette.model.commit((model) => { model.nodeDataArray = updatedNodes; });

Checked below:
Each category of node exists( all are default)
palette.nodeTemplateMap.count exists
Please let me know if I am missing anything for loading of shapes.

I don’t understand your update code. Shouldn’t that just be:

palette.model = new go.GraphLinksModel(updatedNodes);

What do you mean by:

In your update, as long as all you do is replace the Model.nodeDataArray, you’ll be using the same templates.

My guess is that your updated node data objects don’t specify the “category” property.

@walter thank you this worked, updating model directly