I am using Details component and want to add some content to it (usually a text that is slightly longer than detail's summary text). However, when details is opened, content overflows details width, which increases overall width of details, which is unwanted behavior.

Code:

val details = new Details("Short summary",
                new Span("Very looooooooong text that is wider than summary." +
                            "This span can even be wrapped in layout component like vertical layout"));

Example:

When closed: closed state of details component

When opened: opened state of details component

Using vaadin 24.

0

There are 0 best solutions below