title: Gridpanel auto resize on window resize
body: <p>I'm using the array-grid extjs example to try and fit a gridpanel into a container window. The problem is on resizing the container window, the gridpanel doesn't automatically fit the new size. As I understand it that's how it's supposed to work.</p>
  
  <p>Here's the link to the example: <a href="http://www.extjs.com/deploy/dev/examples/grid/array-grid.html" rel="noreferrer">http://www.extjs.com/deploy/dev/examples/grid/array-grid.html</a></p>
  
  <p>What I've done is changed the following..</p>
  
  <pre><code>// Added to gridpanel config
  layout: 'fit',
  viewConfig: {
      forceFit: true
  }
  
  // Window container
  var gridWindow = new Ext.Window({
      items: [
          grid
      ]
  });
  
  // Instead of grid.render, use gridWindow.show();
  gridWindow.show();
  </code></pre>
  
  <p><img src="https://imgur.com/hNLlVl.jpg" alt="result"></p>