appreciated / demo-helper-view

Component collection to create visually appealing Vaadin addon demos
Apache License 2.0
1 stars 0 forks source link

Paragraph without description is not visible #6

Closed watho closed 5 years ago

watho commented 5 years ago

Paragraph is set non-visible in constructor of ParagraphView if description is null.

public ParagraphView(String header, String description) {
        this();
        getHeaderLabel().setText(header);
        add(headerLabel);
        if (description != null) {
            getDescriptionLabel().setText(description);
            add(descriptionLabel);
        } else {
            setVisible(false);
        }
        setAlignItems(Alignment.CENTER);
    }

If this is intended than the following constructors doesn't make sense

 public ParagraphView(String header) {
        this(header, (String) null);
    }

    public ParagraphView(String header, Component[] components) {
        this(header, null, components);
    }
appreciated commented 5 years ago

Thanks for reporting 👍