GLMakie: how to refresh Menu object when item is selected via code?

Consider the following code

using GLMakie

fig = Figure()
b = Button(fig, label="Select ABC", textsize=20)
m = Menu(fig, options=zip(["A", "AB", "ABC"], 1:3), default="A", textsize=20)
panel = GridLayout()
panel[:v] = [b, m]
fig[1,1] = panel

on(b.clicks) do n
    # It seems you can pass any value to m.selection
    m.selection[] = "ABC"
end

on(m.selection) do idx
    println(idx)  # it will print "ABC" when the button clicks
end

When the button is clicked, the listener of m.selection is triggered. However, the Menu object displayed in the figure still shows that the item “A” is selected but not “ABC”.

My question is: what can I do to let the menu selected item reflect the button click? Thanks!

I think you can set m.i_selected = j where j is the index of the option, but that was not intended to be public API (it even says so in the docstring).

Thanks! It works. Though it is weird in the doc https://docs.makie.org/v0.18.2/examples/blocks/menu/
It says:

i_selected: Index of selected item. Should not be set by the user. Default: 0