Black Lives Matter. Please consider donating to Black Girls Code today.

Updatemenus stop being redrawn when type changed

I have some updatemenus that change based on certain events.

In particular, one updatemenu is change back and forth from type dropdown to buttons.

If I set the updatemenus[i].type, then Plotly.redraw stops working.

I include an example. In this example, when an item is selected on the first menu, the second menu changes.

In the first case, there is no change in updatemenus[1].type, and it works, BUT, only dropdowns are used.

In the second case, the code is the same, but the layout.updatemenus[i].type is changed. Then, the code stops working.

I found a way around making a double relayout. In one, the updatemenus are voided, and in the second reinserted.

It works, but it is not a clean solution.