Set layout = 'Fit' to tab item
<p>I have a tabpanel as follows-</p>

<pre><code> var topTab = Ext.create('Ext.tab.Panel', {
      region: 'center'
 });
</code></pre>

<p>I am adding tab items on click of a button</p>

<pre><code> topTab.add(someGrid);
</code></pre>

<p>this works well. Only the issue is, this grid is not getting fit into the tab item. I want to set layout = 'fit' to this tab.</p>

<p>I tried adding </p>

<p><code>topTab.items[0].setLayout</code> but it is not working. Also tried giving height to the grid.</p>

<p>Any suggestions. <strong>(Using ExtJs 6)</strong></p>