oωo (owo-lib)

oωo (owo-lib)

17M Downloads

`childById` can't access components in a collapsed `CollapsibleContainer`

kikugie opened this issue · 0 comments

commented
CollapsibleContainer container = Containers.collapsible(Sizing.fill(), Sizing.fill(), Text.of("Example"), false);
LabelComponent label = Components.label(Text.of("A label!"));
label.id("label");

container.child(label);
container.childById(LabelComponent.class, "label"); // == null because childById doesn't look in `collapsibleChildrenView`

Even though the label is added, it can't be configured when accessed with childById. This issue is most annoying when a separate method returns a CollapsibleContainer with components that are meant to be accessed by id and configured further.
For example, when container is defined in a xml file and supposed to be dynamically populated with code.