VerticalSplitPanel hides grid's caption
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Vaadin Framework version:
8.8.2
Browser version:
Chrome latest
Web container name and version:
embedded jetty
Description of the bug:
If you place a grid with a defined caption inside a VerticalSplitPanel, the caption will not be shown.
Minimal reproducible example
@Theme("mytheme")
public class MyUI extends UI {
@Override
protected void init(VaadinRequest vaadinRequest) {
final VerticalSplitPanel layout = new VerticalSplitPanel();
// final VerticalLayout layout = new VerticalLayout();
Grid<String> grid = new Grid<>("Grid Caption");
grid.addColumn(item->"Column Value 1").setId("column1");
grid.addColumn(item->"Column Value 2").setCaption("Column 2");
grid.addColumn(item->"Column Value 3").setCaption("Column 3");
grid.setItems("Item 1","Item 2","Item 3","Item 4","Item 5","Item 6","Item 7","Item 8");
layout.addComponents(grid);
setContent(layout);
}
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
@VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
public static class MyUIServlet extends VaadinServlet {
}
}
Expected behavior
It should show grid's caption.
Actual behavior
It's not showing grid's caption. If you replace the layout for a VerticalLayout (uncomment line in the provided example, and comment the VerticalSplitPanel instantiation) then the caption will be shown.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Java minimal reproducible example, using VerticalSplitPanel and then VerticalLayout for comparison. Confirm the grid caption behavior in both layouts, then trace the VerticalSplitPanel rendering path; done means the grid caption is visible when placed inside it without changing the grid configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100