AccordionPanel cannot be opened programatically

I am using Vaadin 14.08 and programmatically add 2 AcordionPanels to an Accordion.
The first panel is opened by default.

But if I do


And then;

The “secondPanel” is NOT opened.

If I run the program, the “secondPanel” can be opened clicking on it, but programmatically I cannot open it.

I think it may be a bug. But maybe I am doing something wrong.
Can anyone help me?.

If no response, I will try “Details” component instead of Accordion.

PD: I have tried Details and works!

At the moment Accordion has been implemented in the way, that it allows only one panel to be opened at the time.

Thanks Mr. Tatu Lund,

Before opening any panel, I have closed previously the rest of panels in the accordion,
but no other panel can be opened programmatically.