react-component / react-component/select

dropdownAlign 能否默认支持左对齐和右对齐两种显示策略,避免 dropdownMatchSelectWidth 为 false 时 dropdown 可能显示到可视区域以外

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

目前情况:
screen shot 2018-12-11 at 11 04 11 am

props.dropdownAlign 目前的默认值是空对象,需要在使用的时候主动传入,建议下拉选项默认就支持显示在可见区域,props.dropdownAlign 能否把以下配置作为默认值:

dropdownAlign: {
  points: ['tl', 'bl', 'tr', 'br'],
  offset: [0, 4],
  overflow: {
    adjustX: true,
    adjustY: true,
  },
}

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 by locating the default handling for props.dropdownAlign and the dropdown positioning entry point. Reproduce the case where dropdownMatchSelectWidth is false, then verify the proposed points, offset, and overflow settings keep the dropdown within the visible area while supporting both left and right alignment.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.