How to modify data in node's itemtemplet?

here is my code:

diagram.nodeTemplate =
    Go(go.Node, "Vertical",
        new go.Binding("itemArray", "items"));
diagram.model =
    Go(go.GraphLinksModel,
        {
            nodeDataArray: [
                { key: 1, items: [ "Alpha", "Beta", "Gamma", "Delta" ] },
                { key: 2, items: [ "first", "second", "third" ] }
            ]
        });

and the result is
image

now i want to add a new item in the left node, and i tried this function

function test() {
    let node = diagram.findNodeForKey("1");
    diagram.model.commit(m => {
        let data = node.data.items;
        data.push(data[0]);
        m.set(node.data, "items", data);
        console.log(data);
    }, "test");
}

but it don’t work, console printed
image

any one can help me?

Your call to Model.set is a no-op, because the new Array reference is the same as the old one.

Instead, call Model | GoJS API.

diagram.model.commit(m => {
    const data = m.findNodeDataForKey(1);
    if (data) m.addArrayItem(data.items, data.items[0]);
  }, "test");