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: tab header paginator not show without viewport resize #562

Merged

Conversation

yangxiaolang
Copy link
Collaborator

在首次渲染的时候, tablist 的尺寸需要 paginator 时不会显示 paginator , 原因是 tablist 变更时 dom 尺寸还未变化, 导致计算值不正确
目前的实现只监听 viewport 的尺寸变化

处理是使用 ResizeObservable 监听 tablist 的 dom 尺寸变化, 跟 window.resize 同样触发 realign
不再关注 tabLabelCount 的变化来更新 paginator 显示

Copy link

changeset-bot bot commented Jun 6, 2024

🦋 Changeset detected

Latest commit: 5b512e8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alauda/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

fengtianze
fengtianze previously approved these changes Jun 11, 2024
@yangxiaolang yangxiaolang merged commit 654abd7 into master Jun 12, 2024
8 checks passed
@yangxiaolang yangxiaolang deleted the fix/tab-header-paginator-not-show-without-viewport-resize branch June 12, 2024 08:51
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