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

fix(module:tree-view): re-rendering fix for virtual-scroll-view #8035

Merged

Conversation

oleksandr-codefresh
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

node.ts / hasContextShapeChanged function previously didn't allow customisation of how to compare data objects and did that by simple object link comparison.

Issue Number: N/A

What is the new behavior?

Now it will use treeControl.trackBy function to extract concreate key field from object (as user defined) and do it in proper and optimised way

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #8035 (de798bd) into master (fa0312a) will not change coverage.
The diff coverage is n/a.

❗ Current head de798bd differs from pull request most recent head 6fe9ea1. Consider uploading reports for the commit 6fe9ea1 to get more accurate results

@@           Coverage Diff           @@
##           master    #8035   +/-   ##
=======================================
  Coverage   91.64%   91.64%           
=======================================
  Files         515      515           
  Lines       17640    17640           
  Branches     2790     2790           
=======================================
  Hits        16167    16167           
  Misses       1175     1175           
  Partials      298      298           

[ node.ts ]: 'hasContextShapeChanged' func previously didn't allow customization of how to compare data objects, now it will use treeControl.trackBy func to do it in proper and optimized way
@oleksandr-codefresh
Copy link
Contributor Author

@hsuanxyz Hi, pls review once it will be possible, thx)

Copy link
Member

@hsuanxyz hsuanxyz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@simplejason simplejason merged commit 68cb4b2 into NG-ZORRO:master Sep 12, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants