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: auto spread width when table size is large than columns #1021

Merged
merged 3 commits into from
Sep 13, 2023
Merged

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Sep 12, 2023

@vercel
Copy link

vercel bot commented Sep 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
table ✅ Ready (Inspect) Visit Preview Sep 12, 2023 2:35pm

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #1021 (8312601) into master (530fd48) will increase coverage by 0.00%.
The diff coverage is 100.00%.

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

@@           Coverage Diff           @@
##           master    #1021   +/-   ##
=======================================
  Coverage   99.40%   99.41%           
=======================================
  Files          47       47           
  Lines        4395     4430   +35     
  Branches      556      561    +5     
=======================================
+ Hits         4369     4404   +35     
  Misses         26       26           
Files Changed Coverage Δ
src/Table.tsx 99.77% <100.00%> (+<0.01%) ⬆️
src/VirtualTable/index.tsx 100.00% <100.00%> (ø)
src/hooks/useColumns/index.tsx 100.00% <100.00%> (ø)
src/hooks/useColumns/useWidthColumns.tsx 98.90% <100.00%> (+0.30%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

if (process.env.NODE_ENV !== 'production') {
warning(false, '`scroll.x` in virtual table must be number.');
}
scrollX = 1;
Copy link
Member

Choose a reason for hiding this comment

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

这个改动小弟没咋理解 🤔️

Copy link
Member Author

Choose a reason for hiding this comment

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

通过 Table 的 useColumns 计算,所以这边不需要用户强制配置了。

@zombieJ zombieJ merged commit f0e1235 into master Sep 13, 2023
8 checks passed
@zombieJ zombieJ deleted the resize branch September 13, 2023 03:14
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