Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

displayName of empy string defaults to field property name #363

Closed
c0bra opened this issue Apr 25, 2013 · 3 comments
Closed

displayName of empy string defaults to field property name #363

c0bra opened this issue Apr 25, 2013 · 3 comments
Assignees
Milestone

Comments

@c0bra
Copy link
Contributor

c0bra commented Apr 25, 2013

e.g.

{ displayName: '', field: 'id' }

Will show "id" instead of nothing for the column header row. column.js should probably check that displayName is undefined for using the field property, rather than just this || switch:

self.displayName = colDef.displayName || colDef.field;
@specialjyo
Copy link

I noticed this as well, had to use:

{ displayName: ' ', field: 'id' }

@ghost ghost assigned c0bra Apr 26, 2013
c0bra added a commit that referenced this issue Apr 29, 2013
When the columnDef displayName property was an empty string, the column
class was defaulting to using the field name in the header template. Now
it will allow an empty string and will only use the field name if
displayName is undefined.
c0bra added a commit that referenced this issue Apr 30, 2013
When the columnDef displayName property was an empty string, the column
class was defaulting to using the field name in the header template. Now
it will allow an empty string and will only use the field name if
displayName is undefined.
@c0bra
Copy link
Contributor Author

c0bra commented May 8, 2013

Fixed in 2.0.6 branch.

@c0bra c0bra closed this as completed May 8, 2013
@wang-chengchao
Copy link

ui-grid colDef.name or colDef.field property is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants