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

Allow to add css class per row #355

Merged
merged 2 commits into from
May 25, 2017
Merged

Allow to add css class per row #355

merged 2 commits into from
May 25, 2017

Conversation

ashuraits
Copy link
Contributor

@ashuraits ashuraits commented May 15, 2017

Simply added a function that handles css class for each row in table.
fixes #344

@lopenchi
Copy link

lopenchi commented May 19, 2017

When it is going to be part of the library??

@lopenchi
Copy link

Still waiting that the PR has been added :( HELP US!!!

@lexzhukov lexzhukov merged commit 845c8cf into akveo:master May 25, 2017
@lexzhukov
Copy link
Contributor

@AlexShuraits thanks for PR.

@valekar
Copy link

valekar commented Oct 6, 2017

How can I use this functionality ?

@marnixbent
Copy link

marnixbent commented Dec 26, 2017

settings = {
        rowClassFunction: (row) => {
          if (row.cells[0].newValue === 'YAY!') {
              return 'text-success';
          } else {
              return 'text-danger';
          }
        },
        columns: {
            reactionType: {
                title: 'Type',
                filter: false,
                sort: false,
            }
        }
    };

This function is missing in the documentation.

@DependencyHell
Copy link

I would love a cellClassFunction 🤓

@lenichols
Copy link

Be sure to put the rowClassFunction above all other settings parameters so the class settings can be mapped to the row before the row is set otherwise you will get 'undefined' in your class name which you set. I was stumped on this for hours.

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.

Allow to add class per row
7 participants