Greetings!
There was a need to get the width of the VerticalLayout component.
I try to do it through the js-function, it doesn’t work. The output is always null;
Tell me, where is the mistake? Maybe there are other ways to do this?
String[] width = new String[1]
;
grid.getElement().getParent().executeJs("return document.getElementById('content-layout').clientWidth;")
.then(String.class, result -> width[0]
= result);