Ag-grid: gridOptions.columnDefs does not change after api.setColumnDefs(...)

Created on 7 Nov 2017  路  1Comment  路  Source: ag-grid/ag-grid

I'm submitting a ... (check one with "x")

[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/ceolter/ag-grid/blob/master/CONTRIBUTING.md#question

Current behavior

After invoking gridOptions.api.setColumnDefs(data), the columnDefs property does not change and keeps default value from initialization
Expected behavior

I think columnDefs property value should be updated after api.setColumnDefs()
Minimal reproduction of the problem with instructions

vanilla js
https://plnkr.co/edit/muvbQl5bykynvKXn4nnZ?p=preview
angularJs
https://plnkr.co/edit/zNGDHMof5PN3HmNNIBPt?p=preview
Just observe result, code is simple, plnkr is with v14
What is the motivation / use case for changing the behavior?

My table columns are dynamic, moreover I want to use autoadjusting from columns API, it does not work for dynamically added columns with setColumnDefs() method because columnDefs property does not change
Please tell us about your environment:

Wind 10, latest chrome

  • ag-Grid version: X.X.X

    13.3.1
  • Browser:

    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Javascript, angularJs 1.6
possible bug

>All comments

Hi,

This is working as designed, you will need to keep of the new cols yourself as a workaround, this being then a feature request and right now we are only taking feature requests/support that come through Zendesk (see disclaimer below)

===============

If you are an ag-Grid Enterprise Customer, please raise this in our Zendesk support system - contact [email protected] for access. This is our primary channel for Support.

Bugs Raised Here:

We will do a periodic review of GitHub issues for any bugs raised and these can be tracked on our pipeline page: https://www.ag-grid.com/ag-grid-pipeline

Feature Requests/Support Raised Here:

We are reviewing how we process Feature Requests that come from GitHub. We currently have a very full pipeline of work which will be our priority for the coming months.

As a result, we don鈥檛 have capacity to take feature requests from GitHub.

We will review this as we move through our current backlog.

Thanks for your understanding.
ag-Grid Team.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LuisPalacios picture LuisPalacios  路  3Comments

saurabhraja picture saurabhraja  路  3Comments

WxWatch picture WxWatch  路  3Comments

rboughani picture rboughani  路  3Comments

liuren78 picture liuren78  路  3Comments