Skip to content

Conversation

@BSd3v
Copy link
Collaborator

@BSd3v BSd3v commented Dec 2, 2024

adjusting styling to check if the node exists, instead of testing for data, this fixes an issue with rowGrouping not passing through the styling conditions

BSd3v added 3 commits December 2, 2024 15:16
…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
@BSd3v BSd3v requested review from alexcjohnson and ndrezn December 2, 2024 22:07
for (const {test, style} of tests) {
if (params) {
if (params.data) {
if (params.node.id && params.node.id !== null) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@gvwilson gvwilson added community community contribution fix fixes something broken P2 considered for next cycle labels Dec 3, 2024
@BSd3v BSd3v linked an issue Dec 4, 2024 that may be closed by this pull request
Copy link
Member

@ndrezn ndrezn left a 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.

@BSd3v BSd3v merged commit 2f4e2cf into plotly:main Dec 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community community contribution fix fixes something broken P2 considered for next cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conditional styling is not being applied in dash-ag-grid v31.3.0

3 participants