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(cdk:scroll): virtual list render error after dataSource change #1949

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

sallerli1
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

虚拟滚动,当数据更新时,有几率导致某行的列数据渲染没有正常更新到新的数据

出现于:proTable 开启双向虚拟滚动,并取消勾选某几列的显示(无横向滚动条状态),向下滚动,会出现某行的列并没有改变,而导致整个表格的列错位

What is the new behavior?

修复以上问题

Other information

问题原因:
在渲染池计算的过程中,如果有某行的渲染池元素被回收且没有被立刻复用,其中的列就并不会在数据更新的时候全回收,导致该元素被复用的时候列数据出现错误

修改方法:
在一次行更新的过程中,找到没有被当次更新直接复用并退回到渲染池中的元素,回收该元素中所有的列数据

Copy link

idux-bot bot commented Jul 4, 2024

This preview will be available after the AzureCI is passed.

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.70%. Comparing base (9c81358) to head (2c30fb0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1949   +/-   ##
=======================================
  Coverage   90.70%   90.70%           
=======================================
  Files         360      360           
  Lines       35595    35595           
  Branches     3863     3863           
=======================================
  Hits        32286    32286           
  Misses       3309     3309           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sallerli1 sallerli1 merged commit 491d5aa into IDuxFE:main Jul 4, 2024
9 checks passed
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.

None yet

1 participant