Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

childById can't access components in a collapsed CollapsibleContainer #288

Open
kikugie opened this issue Aug 22, 2024 · 0 comments
Open

Comments

@kikugie
Copy link
Contributor

kikugie commented Aug 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant