davidguttman / react-pivot

React-Pivot is a data-grid component with pivot-table-like functionality for data display, filtering, and exploration.
http://davidguttman.github.io/react-pivot/
1.05k stars 150 forks source link

className #28

Open rpryde opened 8 years ago

rpryde commented 8 years ago

I am currently looking for a way to use conditional styles based on calculation results. value: & template: fields allow the utilization of functions. It would appear that className: does not. That being the case, is there a method you could suggest to achieve this?

davidguttman commented 8 years ago

If you're ok with just styling the inside of the cell, here's an example of turning the value either red or green if the number is positive or negative: https://github.com/davidguttman/react-pivot-mean-slides/blob/master/client/no-frills-rg.js#L57