Skip to content

Commit

Permalink
Fix select popupContainer in site header
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Aug 14, 2017
1 parent 4b38dbd commit 57e3be2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/select/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ title: Select
| labelInValue | 是否把每个选项的 label 包装到 value 中,会把 Select 的 value 类型从 `string` 变为 `{key: string, label: ReactNode}` 的格式 | boolean | false |
| tokenSeparators | 在 tags 和 multiple 模式下自动分词的分隔符 | string[] | |

> 注意,如果发现下拉菜单跟随页面滚动,或者需要在其他弹层中触发 Select,请尝试使用 `getPopupContainer={triggerNode => triggerNode.parentNode}` 将下拉弹层渲染节点固定在触发器的父元素中。
### Option props

| 参数 | 说明 | 类型 | 默认值 |
Expand Down
1 change: 1 addition & 0 deletions site/theme/template/Layout/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export default class Header extends React.Component {
dropdownMatchSelectWidth={false}
defaultValue={antdVersion}
onChange={this.handleVersionChange}
getPopupContainer={trigger => trigger.parentNode}
>
{versionOptions}
</Select>,
Expand Down

0 comments on commit 57e3be2

Please sign in to comment.