Ant-design: Popover and Select

Created on 14 Oct 2016  ·  3Comments  ·  Source: ant-design/ant-design

Is it possible to prevent the changing of visibility of popover after interaction with Select?

Here is demo:
http://codepen.io/anon/pen/XjBVbp?editors=0011

❓FAQ

Most helpful comment

getPopupContainer https://ant.design/components/select/#Select-props

https://codepen.io/anon/pen/NaMbVg?editors=0011

You can use getPopupContainer={triggerNode => triggerNode.parentNode} to make select dropdown menu rendering inside the Popover content.

https://github.com/ant-design/ant-design/wiki/FAQ#select-dropdown-datepicker-timepicker-popover-popconfirm-will-scroll-with-page

3487

All 3 comments

getPopupContainer https://ant.design/components/select/#Select-props

https://codepen.io/anon/pen/NaMbVg?editors=0011

You can use getPopupContainer={triggerNode => triggerNode.parentNode} to make select dropdown menu rendering inside the Popover content.

https://github.com/ant-design/ant-design/wiki/FAQ#select-dropdown-datepicker-timepicker-popover-popconfirm-will-scroll-with-page

3487

Works! i would add this to official examples. Thanks.

hello
我试着用上面的方法 getPopupContainer={(triggerNode: any) => triggerNode.parentNode} 结果

1556620903631-image
遮盖了select<Select getPopupContainer={(triggerNode: any) => triggerNode.parentNode} mode="multiple" notFoundContent={selectLoading ? <Spin size="small" /> : ``} filterOption={false} onSearch={this.totalFocusHandler.bind(this,siteCode)} style={{ width: '100%' }} > {siteCodeList.map((item: any, index: any) => <Option key={${item.sitecode}${index}} value={item.sitecode} >{item.sitecode}</Option>)} </Select>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xtznhzxdev picture xtznhzxdev  ·  3Comments

ryannealmes picture ryannealmes  ·  3Comments

ericdai picture ericdai  ·  3Comments

drcmda picture drcmda  ·  3Comments

PeteAndersen picture PeteAndersen  ·  3Comments