Open guttormvik2 opened 4 days ago
Originally it was requirement that ComponentRenderer must not return null, but it was lifted by this PR: https://github.com/vaadin/flow-components/pull/4361/files
However it seems not to be complete.
Similar fix is needed in here: https://github.com/vaadin/flow/blob/main/flow-data/src/main/java/com/vaadin/flow/data/provider/AbstractComponentDataGenerator.java#L49
Same approach could be used,
if (recreatedComponent == null) {
recreatedComponent = new Text("");
}
And if the fix is added in AbstractComponentDataGenerator, I would assume the fix in ComponentDataGenerator becomes redundant.
You seem to have found a corner case where flow is not going via ComponentDataGenerator ...
Describe the bug
I have a ComponentRenderer column that returns either a VaadinIcon.CLOCK.create(), a Div with some text, or null. When I click on a row (which also opens the editor) where this has value, everything is fine. When I click on a row where this is null, I get
When I change the ComponentRenderer to return an empty Div instead of null, it works.
Expected-behavior
No response
Reproduction
See description at top. I assume this is simply missing null-test and that the stacktrace is enough? If not I can try to produce an example
System Info
Windows 10, Vaadin 24.3.12, Firefox 127.0