alwaysByViewport for @rc-component/trigger

Open
#414 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Start with the linked CodeSandbox reproduction and the @rc-component/trigger viewport and htmlRegion behavior described in the issue; no repository file or test is identified. The work is done when an available option keeps oversized popup content within the viewport without losing the target relationship, with the reproduction behavior covered by a regression test.

Written by the indexing model from the issue text.

Description

Any way to force the popup always keep in view for @rc-component/trigger for now?

  • @rc-component/trigger: 1.14.1

Unlike rc-trigger, @rc-component/trigger always try to stick to the target. Is there any option to force it in viewport? I tried htmlRegion options but it doesn't work. This will be very helpful when the content of the popup is larger than the available space.

Thank you~

Reproduction

https://codesandbox.io/s/antd-v5-dropdown-overflow-hz2ymc

Screenshot 2023-07-27 at 3 55 03 PM
Dominant language
TypeScript
Stars
391
Forks
245
PR merge metrics
No merged PRs in 30d

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.

More from react-component/trigger

All issues in react-component/trigger

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.