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(comp:table): refactor table column width measure logic #1899

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

sallerli1
Copy link
Contributor

  1. measured width should be used in table header fix holder
  2. column width is evenly aligned when scroll.width is provided
  3. table content colgroup width is set using width config in columns

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?

表头的colgroup也优先使用了column中给定的width,导致表头会有错位

What is the new behavior?

重构宽度测量和计算逻辑,在表格体的colgroup中仅使用配置的宽度,而在固定的表头中和固定列的offset计算中使用测量得到的宽度

Other information

Copy link

idux-bot bot commented Apr 23, 2024

This preview will be available after the AzureCI is passed.

1. measured width should be used in table header fix holder
2. table content colgroup width is set using width config in columns
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.75%. Comparing base (8debc9d) to head (a965ea8).

Files Patch % Lines
packages/components/table/src/Table.tsx 95.45% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1899   +/-   ##
=======================================
  Coverage   90.74%   90.75%           
=======================================
  Files         359      359           
  Lines       35264    35285   +21     
  Branches     2807     2806    -1     
=======================================
+ Hits        32002    32023   +21     
  Misses       3262     3262           

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

@sallerli1 sallerli1 merged commit 425def0 into IDuxFE:main Apr 24, 2024
9 checks passed
@sallerli1 sallerli1 deleted the fix-table-column-width-calc branch July 4, 2024 09:22
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