Search code examples
javavaadinvaadin-flowvaadin-gridvaadin14

Blank selection column when using Selection.MultiSelect on Grid, TreeGrid in Vaadin14


This is in a project that was migrated from Vaadin 8 to 14. This happens even when I do a black grid with lorem filler in it. Here is an example of the problem in action: screen shot of problem

Creating any grid and setting it to multi-selection mode yields this problem. For example, the code at https://cdn.vaadin.com/vaadin-elements/1.0.0/vaadin-grid/demo/selection.html#toc_1_selection_modes leads to this problem for me.


Solution

  • For reference, we manually run each vaadin.flow.server.startup initializer whenever we start our app in dev mode in Eclipse. I forgot to include this detail, as I wasn't aware of it at the time.

    The problem was that we weren't running a DevModeInitializer for the GridSelectionColumn class in the initializer for our app, so none of the @NpmPackage, @JsModule, @CssImport, or @Theme annotations for that class were being included.

    Once we included GridSelectionColumn.class in our initialization, the selection columns looked fine.