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

TabSheet content inside nested FormLayout is not visible due wrong width #12611

Closed
TatuLund opened this issue Apr 12, 2024 · 1 comment
Closed

Comments

@TatuLund
Copy link
Contributor

In complex nested FormLayout / TabSheet combination TabSheet fails to detect the child item width correctly, hence content wrapper element is set width of 0px. Due this content is not visible, although it is in the DOM.

See example view:

public class TabSheetView extends VerticalLayout implements View {
    public static final String NAME = "tabsheet";

    public TabSheetView() {
        FormLayout content = createContent();
        addComponent(content);
    }

    public FormLayout createContent() {
        TextField textField = new TextField(null, "Should be visible",
                ignore -> {
                });
        FormLayout layout = new FormLayout();
        TabSheet nestedTabSheet = new TabSheet(textField);
        nestedTabSheet.getTab(textField).setCaption("Nested");
        FormLayout nestedForm = new FormLayout(nestedTabSheet);
        TabSheet tabSheet = new TabSheet(nestedForm);
        tabSheet.getTab(nestedForm).setCaption("Main");
        layout.addComponent(tabSheet);
        return layout;
    }
}
@thevaadinman
Copy link
Contributor

Fixed in 8.25.0

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

No branches or pull requests

2 participants