Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Grid components not rendered - an example #606

Closed
andreasbean opened this issue Mar 26, 2019 · 1 comment
Closed

Grid components not rendered - an example #606

andreasbean opened this issue Mar 26, 2019 · 1 comment
Projects

Comments

@andreasbean
Copy link

andreasbean commented Mar 26, 2019

Grid<Integer> grid = new Grid();

grid.addColumn((value) -> { return value;}).setHeader("Value").setWidth("50px").setFlexGrow(0); 

grid.addColumn(new ComponentRenderer<>(value -> {
    Div vl = new Div();
    if (value == 5) {
        DatePicker datepicker = new DatePicker();
        datepicker.setLocale(Locale.GERMANY);
        LocalDate date = LocalDate.of(2019, 1, 1);
        datepicker.setValue(date);
        vl.add(datepicker);
    }
    return vl;
})).setWidth("150px").setFlexGrow(1).setHeader("Date"); 

ArrayList<Integer> numbers = new ArrayList();
for (int i = 1; i < 100; i++) {
    numbers.add(i);
}

ListDataProvider<Integer> dataProvider = DataProvider.ofCollection(numbers);

grid.setDataProvider(dataProvider);

Interestingly, when the line datepicker.setValue(date); is removed, then the component is rendered. Also, when not rendered in first place, after a bit of scrolling the component gets shown. What's going on here?

Versions are Vaadin 13.0.2 and Chrome 72.0.3626.121

@andreasbean andreasbean changed the title Grid Components not rendered - an example Grid components not rendered - an example Mar 26, 2019
@jtomass jtomass added this to 📬  Inbox in vaadin-core Mar 29, 2019
@web-padawan
Copy link
Member

web-padawan commented Feb 20, 2020

Seems to be the same Chrome 72 issue as vaadin/flow#5025, see vaadin/flow#5025 (comment).
Workarounded by vaadin/flow#5060. Also, the issue is fixed in more recent Chrome versions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
vaadin-core
  
📬  Inbox
Development

No branches or pull requests

2 participants