Accordion close automatically

Hello, i want to close my accordion when the size of my screen is reducing so that i can make it more responsive

you can listen to window resize events with UI.getCurrent().getPage().addBrowserWindowResizeListener

UI.getCurrent().getPage().retrieveExtendedClientDetails also gets you the viewport size

thanks a lot

Here is a case example

onAttach is one of the most convenient places to hook this into, I would also favor getting UI reference from the component uising getUI or from AttachEvent.