title: Refresh the grid size after browser screen resize Vaadin
body: <p>Vaadin version: 8.1.4</p>
  
  <p>My problem is that after resizing the screen the grid is not resized properly. I use setSizeFull() for a grid. After resizing the browser grid, however, retains its original size.</p>
  
  <p>The next code sample seems to do the trick, but I wonder if there is a better method.</p>
  
  <pre><code>        UI.getCurrent().getPage().addBrowserWindowResizeListener(e -&gt; {
             grid.recalculateColumnWidths();
          });
  </code></pre>
  
  <p>P.S. I forgot to mention, the problem with current solution is that in case of very long texts for fields vaadin tries to adjust the grid so that all the text will fit, which results in grid having more than 100% of width.</p>
  
  <p>Example:</p>
  
  <pre><code>Grid&lt;MyObject&gt; = new Grid(); 
  grid.addColumn(MyObject::getDescription).setCaption("Caption").setSortable(false);
  </code></pre>
  
  <p>Css styling for grid cell:</p>
  
  <pre><code>.v-grid-cell {
      white-space: nowrap;
      overflow: hidden;
  }
  </code></pre>
  
  <p>Without recalculating column widths the grid fits nicely into the page no matter what is the size of the MyObject description, but after the recalculation(in case the MyObject descrtiption does not fit into the browser window) the grid is wider than the window.</p>