Sitelet https://github.com/alauda/ui/pull/562
Skip to content

fix: tab header paginator not show without viewport resize - #562

Merged
yangxiaolang merged 6 commits into
masterfrom
fix/tab-header-paginator-not-show-without-viewport-resize
Jun 12, 2024
Merged

yangxiaolang merged 6 commits into
masterfrom
fix/tab-header-paginator-not-show-without-viewport-resize

Conversation

@yangxiaolang

Copy link
Copy Markdown
Collaborator

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

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

@changeset-bot

changeset-bot Bot commented Jun 6, 2024 •

Copy link
Copy Markdown

🦋 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

Comment thread src/tabs/tab-header.component.ts Outdated
fengtianze
fengtianze previously approved these changes Jun 11, 2024
@yangxiaolang
yangxiaolang merged commit 654abd7 into master Jun 12, 2024
@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