react-component / react-component/pagination
切换每页数量的select的下拉框定位不准确
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 674
- Forks
- 333
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
最小复现
发生情况
当pagination的祖先元素设置了transform的scale时,每页数量的下拉框的定位不准确
解决
经过源码调试,只需要简单去除Select组件上的{ getPopupContainer: (triggerNode) => triggerNode.parentNode }即可。
已提交PR。
❓
但是为什么源码当中有这么一个默认的选项,还不是很清楚。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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