Updatemenus button select multiple traces

So if we use

    let updatemenus=[
        {   

            buttons: [
                 {
                    args: ['data' , update],
                    label:'Milliseconds',
                    method:'restyle',
                    execute: false
                }
            ],
            direction: 'left',
            pad: {'r': 10, 't': 10},
            showactive: true,
            type: 'buttons',
            x: 0,
            xanchor: 'left',
            y: -0.1,
            yanchor: 'top'
        }
    ];

let update = {x: [xnew, xnew2], y:[yold, yold2]}
let layout_update = {
updatemenus: updatemenus
};
Plotly.relayout(graphElement, layout_update);
// Plotly.restyle(graphElement, update, [0,1])

When we use restyle explicity ,it works fine and the button updates the 2 traces in the plot with new ones. But the updatemenus Buttons has no option to specify the traces anywhere, the button shows up on the plot, but clicking it doesnt do anything, and gives no error in the console.
How do we specify the traces it has to work on, and can we specify multiple traces in an optional format kind of way

traces = [0, [1]]

which would select [0] in all cases, and 1 if specified

Hmm, what if you do:

            buttons: [
                 {
                    args: [update, [0, 1]],
                    label:'Milliseconds',
                    method:'restyle',
                    execute: false
                }
            ],

Thanks, this worked ! Maybe we drop this in the documentation too?

can we specify multiple traces in an optional format kind of way

traces = [0, [1]]

which would select [0] in all cases, and 1 if specified

Any suggestions on how to achieve this please?

I fixed my code elsewhere to not have to deal with this situation in plotly.

Hello
Greetings from Germany! I encountered the same issue as you. Could you show the updated code? Thanks a lot!