Grid icon column

Probably a dumb question, but the answer doesn’t seem obvious to me…

Vaadin 10-12, if I want to have a Grid column that may or may not have a single icon, how should I do that? IconRenderer doesn’t accept returned null values, so it appears an icon would always be required. Not sure why it’s so strict since ComponentRenderer (from which it’s derived) doesn’t appear to care. Is the only way to do this to fall back to using ComponentRenderer?

EDIT: I was incorrect and ComponentRenderer does explode with null return values, though it doesn’t do an immediate check like IconRenderer does. My solution with ComponentRenderer was simply to return a Div. It would be nice if IconRenderer could do similar (if required… doesn’t seem as efficient as possible).

I created ticket about this https://github.com/vaadin/vaadin-grid-flow/issues/463 It is a minor thing, but I agree it would be in some cases a better DX.

Thanks, Tatu.