-
Notifications
You must be signed in to change notification settings - Fork 41
Fix Styling for Nodes #346
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
Conversation
…or `data`, this fixes an issue with `rowGrouping` not passing through the styling conditions
… always exist in the `infinite` model even if the `node` was present
| for (const {test, style} of tests) { | ||
| if (params) { | ||
| if (params.data) { | ||
| if (params.node.id && params.node.id !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using enterprise and row grouping, the data is not present on the rows that are grouped. This was causing an issue when trying to apply styling based upon aggregate info.
However, removing data and just letting the values pass would break the app if the dev didnt have something like this in the condition: params.data ? params.data[column] : null. This was especially the case when dealing with infinite scroll.
Instead, by checking to see if the node.id exists and is not null allows an actual row to be tested, instead of rows that arent quite in existance.
ndrezn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 💃 Top-level object comparison isn't going to be sufficient... nice fix.
adjusting styling to check if the
nodeexists, instead of testing fordata, this fixes an issue withrowGroupingnot passing through the styling conditions