fix: tab header paginator not show without viewport resize #562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在首次渲染的时候, tablist 的尺寸需要 paginator 时不会显示 paginator , 原因是 tablist 变更时 dom 尺寸还未变化, 导致计算值不正确
目前的实现只监听 viewport 的尺寸变化
处理是使用 ResizeObservable 监听 tablist 的 dom 尺寸变化, 跟 window.resize 同样触发 realign
不再关注 tabLabelCount 的变化来更新 paginator 显示