You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding columns to the grid, the name property is generated if not already defined. The method which is generating the name is using the displayName to check for duplicates, not the actual name. So adding multiple of the same displayName fails.
I haven't dug into it any deeper, but you can have two instances. When you try to add the third it fails to generate a name, and leaves it undefined (which causes problems later).
As a side note, there are quite a few comments in the code about allowing a blank "name" for backwards compatibility. I think this also actually an important feature to have. Consider the case of grouping and showing different aggregations for different columns, where the user is allowed to chose which columns to add and remove.
The text was updated successfully, but these errors were encountered:
AgDude
changed the title
error on adding column with displayName
error on adding column with displayName and without name
May 7, 2015
When generating unique column names, do not consider the displayName.
Increment column name property only, using the field as the base.
Increment displayName property only if it is auto-generated,
displaying any provided displayName unchanged.
Fixes: angular-ui#3453
AgDude
pushed a commit
to AgDude/ui-grid
that referenced
this issue
May 23, 2015
When generating unique column names, do not consider the displayName.
Increment column name property only, using the field as the base.
Increment displayName property only if it is auto-generated,
displaying any provided displayName unchanged.
Fixes: angular-ui#3453
When adding columns to the grid, the name property is generated if not already defined. The method which is generating the name is using the
displayName
to check for duplicates, not the actual name. So adding multiple of the same displayName fails.I haven't dug into it any deeper, but you can have two instances. When you try to add the third it fails to generate a name, and leaves it undefined (which causes problems later).
http://plnkr.co/edit/0D7qgs?p=preview
As a side note, there are quite a few comments in the code about allowing a blank "name" for backwards compatibility. I think this also actually an important feature to have. Consider the case of grouping and showing different aggregations for different columns, where the user is allowed to chose which columns to add and remove.
The text was updated successfully, but these errors were encountered: