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

Add contentPath attribute #33

Merged
merged 1 commit into from
Mar 2, 2013
Merged

Conversation

alexspeller
Copy link
Contributor

This adds a contentPath attribute that you can provide instead of a getCellContent method. I found that a lot of the time I just wanted a named attribute from a row rather than any formatting, and this allows that less verbosely. As it is a path, it's possible to do multilevel access e.g. contentPath: 'foo.bar.baz'.

Of course, there is still the option to provide the function to do anything more advanced e.g. formatting etc.

(I am working towards #31 but want to do a bit at a time with some minor api changes first, as it will change how I need to refactor those features)

@ppong
Copy link
Contributor

ppong commented Mar 2, 2013

hey @alexspeller I definitely agree with you on this. I had been thinking about doing something similar also in the Ember.Table.DynamicTableCell example,
https://github.com/Addepar/ember-table/blob/master/examples/table_with_dynamic_bar/table_bar.coffee

@ppong
Copy link
Contributor

ppong commented Mar 2, 2013

lgtm merged

ppong pushed a commit that referenced this pull request Mar 2, 2013
@ppong ppong merged commit c087261 into Addepar:master Mar 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants