If a ListBox is initially set with setVisible(false)
, it will display all items as blank when setVisible(true)
is executed later. This happens for the first time only, if we toggle the visibility again, items are displayed.
Looks like it is a bug:
ListBox<String> lb = new ListBox<>();
lb.setItems(...);
lb.setVisible(false);
add(lb);