Skip to content

Commit 74d152a

Browse files
javier-godoymlopezFC
authored andcommitted
feat: set a default id in the demo content
1 parent 744c351 commit 74d152a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ public void addDemo(Component demo) {
122122
* @param sourceCodeUrl the url of the demo, <b>null</b> to not show source code section.
123123
*/
124124
public void addDemo(Component demo, String label, String sourceCodeUrl) {
125+
if (!demo.getId().isPresent()) {
126+
demo.setId("content");
127+
}
125128
Tab tab = new Tab(label);
126129
if (sourceCodeUrl != null) {
127130
demos.put(tab, new SplitLayoutDemo(demo, sourceCodeUrl));

0 commit comments

Comments
 (0)