-
Notifications
You must be signed in to change notification settings - Fork 161
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
Feature request - Conditional cell styling capability #1079
Labels
🧰 feature-request
version: 6.2.x
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Comments
bkulov
added
the
🛠️ status: in-development
Issues and PRs with active development on them
label
Sep 10, 2018
SAndreeva
added a commit
that referenced
this issue
Sep 13, 2018
SAndreeva
added a commit
that referenced
this issue
Sep 13, 2018
SAndreeva
added a commit
that referenced
this issue
Sep 14, 2018
SAndreeva
added a commit
that referenced
this issue
Sep 17, 2018
SAndreeva
added
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
and removed
🛠️ status: in-development
Issues and PRs with active development on them
labels
Sep 19, 2018
All, thank you sooo much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🧰 feature-request
version: 6.2.x
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Scenario what I'd like to achieve
I'd like to conditionally change cell background color according to another cell value or something. I think this is a common scenario and am advanced story of this.
Problem
In order to achieve that, only we can do for now is use cell template like this.
But, It doesn't work as I expect because the igx-grid-cell has default padding so that background color of the cell template can not be filled inside the cell.
Current Solution
So I have to remove default padding of the igx-grid-cell and put padding to the cell template inside the cell.
It works as we expect.
But this solution is a little hassle.
Here is a sample what I explained above. You can change cell background dynamically by clicking checkbox.
https://stackblitz.com/edit/igx-grid-cell-style2
Expect
I'd like a feature that we can attach conditional classes to the cell directly so that we don't have to remove default padding.
For example,
cellClassses
accepts function in addition to string like below.It's just an idea. But such a capability would enable the developers more easily handle conditional styling not only background color but also many other css props for cells.
I would appreciate your consideration.
The text was updated successfully, but these errors were encountered: