[cellClass]/[rowClass] function does not have the scope of component class
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior at the moment it is not possible, to add a style-classe depending on a property from the component (in the plnkr example below you can see one property name I’m checking against in the getClass-fucntion and one hardcoded - which does work).
is there already a way to inject some properties into the function over the template? or is it possible to change the function call internally to apply the scope from the class?
Expected behavior possibility to change the scope of the function to the scope of the component where the function belongs to, or the possiblity to inject parameters for some checks
Reproduction of the problem
http://plnkr.co/edit/iQWBqGpJwt0o9sB0BzOk
What is the motivation / use case for changing the behavior?
my special need for it is to highlight rows when they match on a property which is set in the component class
Please tell us about your environment:
- Table version: 9.1.0
- Angular version: 4.1.1
- Browser: [all]
- Language: [all]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top GitHub Comments
Possible workaround:
Instead of this:
Do this:
You can also use an anonymous arrow func to reference the component scope: