{"action":"opened","issue":{"url":"https://api.github.com/repos/ceolter/ag-grid-react/issues/4","repository_url":"https://api.github.com/repos/ceolter/ag-grid-react","labels_url":"https://api.github.com/repos/ceolter/ag-grid-react/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ceolter/ag-grid-react/issues/4/comments","events_url":"https://api.github.com/repos/ceolter/ag-grid-react/issues/4/events","html_url":"https://github.com/ceolter/ag-grid-react/issues/4","id":134158247,"number":4,"title":"Autosizing the columns are not working with sizeColumnsToFit","user":{"login":"dileep8014","id":6253752,"avatar_url":"https://avatars.githubusercontent.com/u/6253752?v=3","gravatar_id":"","url":"https://api.github.com/users/dileep8014","html_url":"https://github.com/dileep8014","followers_url":"https://api.github.com/users/dileep8014/followers","following_url":"https://api.github.com/users/dileep8014/following{/other_user}","gists_url":"https://api.github.com/users/dileep8014/gists{/gist_id}","starred_url":"https://api.github.com/users/dileep8014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dileep8014/subscriptions","organizations_url":"https://api.github.com/users/dileep8014/orgs","repos_url":"https://api.github.com/users/dileep8014/repos","events_url":"https://api.github.com/users/dileep8014/events{/privacy}","received_events_url":"https://api.github.com/users/dileep8014/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-17T02:27:52Z","updated_at":"2016-02-17T02:27:52Z","closed_at":null,"body":"I tried auto sizing the columns on render and called this method as this.api.sizeColumnsToFit() but nothing happened as expected its not auto sizing the columns as expected . \r\n\r\nBefore i was using regular ag-grid grid inside my react application and it was working fine .\r\ni tried calling this in onGridReady method like below \r\n\r\nonGridReady(params) {\r\n\t    this.api = params.api;\r\n\t    this.columnApi = params.columnApi;\r\n           this.api.sizeColumnsToFit();\r\n  }\r\n\r\n<AgGridReact\r\n\t        onGridReady={this.onGridReady.bind(this)}\r\n\t   \t\tcolumnDefs={columnDefs}\r\n\t   \t\trowData={json}\r\n\t   \t\tonRowDeselected={ this.rowDeselectedFunc.bind(this)}\r\n\t   \t\tonSelectionChanged={this.onSelectionChanged.bind(this)}\r\n\t   \t\trowSelection=\"multiple\"\r\n   \t\t\tsuppressRowClickSelection=\"true\"\r\n\t   \t\tsuppressLoadingOverlay=\"true\"\r\n\t   \t\tenableSorting=\"true\"\r\n\t   \t\tenableFilter=\"true\"\r\n\t   \t\tenableColResize=\"true\"\r\n\t   \t\trowHeight=\"25\"\r\n\t\t/> "}}