Dropdown not showing after changing visibility
tco42 opened this issue · 2 comments
I try to show a multiselect after clicking a button by changing its visibility.
multiselect.setVisible(false);
button.addClickListener(event -> multiselect.setVisible(true));
This causes the dropdown list with all items to not show up after clicking the button / writing in the textfield.
Adding a multiselect to a layout/div and changing visibility on the layout works fine.
Hi @tco42 and thanks for opening this issue. It's quite an interesting case. The client side code is executed and initialised (even though not visible). However, as it tries to call the server to register itself, that call is not forwarded by the framework and thus the component does not fully initialise. I will have to investigate further to see if there is a way to solve this.
For now, as you mentioned, you can work around it by adding it to a parent layout (using a Div could be sufficient enough I guess) and changing its visibility.
I'm experiencing the same issue. I have the Multiselect combo box in a Div that initially it set to hidden. When I later make it visible the Combobox aren't showing any items.