Skip to content
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

Optimize column state sync #3905

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Optimize column state sync #3905

wants to merge 6 commits into from

Conversation

haynesjm42
Copy link
Member

Partial fix for #3903

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry, or determined not required.
  • Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
  • Updated doc comments / prop-types, or determined not required.
  • Reviewed and tested on Mobile, or determined not required.
  • Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

@haynesjm42 haynesjm42 changed the title Ag col state sync update Optimize column state sync Jan 15, 2025
Copy link
Member

@amcclain amcclain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great simplification and clean-up - and now I see why we saw performance worsen in proportion to number of columns being shown/hidden!

Eager to take it - just now wondering if it requires update to AG v32....

cmp/grid/Grid.ts Outdated
colState.splice(
agColState.indexOf(autoColState),
0,
autoColState as ColumnState
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this case risk spoiling the change detection below due to unfortunate hide/hidden mismatch?

I know it's an edge-case where we have this auto-column inserted by the grid - it's due to direct use of AG-grid grouping APIs, is that right? So maybe nothing we need to worry about, just checking if there's some tweak we would make to get it 100%

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, only an issue when using ag-grid grouping without full-row groups, but worthwhile to be correct

cmp/grid/Grid.ts Show resolved Hide resolved
@amcclain
Copy link
Member

If you haven't already, we should have a look over the calls to applyColumnState in AgGridModel also, to see if anything there needs to be (or could be) adjusted to account for changes to that API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants