Weird behavior of FormLayout when toggling visibility of components under i

Layout behavior of FormLayout changes when we toggle visibility of components under it.

An example code is given below. The “Test” button can be clicked to toggle the visibility of the first TextField.

When the text field is made hidden, gaps between rest of the text fields disappear! Screen-shots are attached.

    public class TestFormLayout extends FormLayout {

        public TestFormLayout() {
            TextField tf = new TextField("One");
            add(new Button("Test", e -> tf.setVisible(!tf.isVisible())));
            add(tf);
            add(new TextField("Two"));
            add(new TextField("Three"));
            add(new TextField("Four"));
            add(new TextField("Five"));
            add(new TextField("Six"));
        }
    }

17116941.jpg
17116944.jpg

Sounds like it could be related to this: https://github.com/vaadin/vaadin-form-layout/issues/66

Anyway, if you have the time, please report the issue here: https://github.com/vaadin/vaadin-form-layout-flow/issues

Regards,

Olli

Thanks Olli. I have created a new issue:
[Issue #41]
(https://github.com/vaadin/vaadin-form-layout-flow/issues/41)

Great, thank you!