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 row options #74

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add row options #74

wants to merge 4 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 29, 2014

Hey, I needed some id tags and classes for each table row for handling rows, styling, etc., so I added two simple options to the settings. First option is 'rowId' which displays the document _id for each row. Second option is 'rowClass' which lets you add custom row classes. I updated the README.md as well.

@aslagle
Copy link
Owner

aslagle commented Jun 2, 2014

I can see how this would be convenient, but it isn't a good way to use the html id attribute - it would be better to use a custom attribute like row-id.

Also I'm not sure why you need it, since you can get this._id from the event handler. Is there a case that doesn't work for?

The rowClass option is reasonable, but it might be better if it accepted a function, so the class could be based on the contents of the row? it could work with either a string or a function.

@aslagle aslagle mentioned this pull request Jul 13, 2014
@brugnara
Copy link
Contributor

Does this patch allow to add custom class based on rob object values?

I'm guessing something like angular-way:

{ red: obj.qnt == 0 }

If yes, this would be awesome.

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

Successfully merging this pull request may close these issues.

2 participants