react-component / react-component/pagination

切换每页数量的select的下拉框定位不准确

Open
#472 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
674
Forks
333
Avg merge
12m
Merged PRs (30d)
1

Description

最小复现

复现地址

发生情况

pagination的祖先元素设置了transformscale时,每页数量的下拉框的定位不准确

解决

经过源码调试,只需要简单去除Select组件上的{ getPopupContainer: (triggerNode) => triggerNode.parentNode }即可。
已提交PR

但是为什么源码当中有这么一个默认的选项,还不是很清楚。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pagination page-size selector and its Select configuration, then use the linked CodeSandbox reproduction with a scaled ancestor to observe the positioning problem. Verify the effect of removing the reported getPopupContainer option and confirm that the dropdown is positioned correctly when the pagination is inside a transformed element.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.