Ant-design: ポップオーバーと選択

作成日 2016年10月14日  ·  3コメント  ·  ソース: ant-design/ant-design

Selectとの対話後にポップオーバーの可視性が変化するのを防ぐことは可能ですか?

これがデモです:
http://codepen.io/anon/pen/XjBVbp?editors=0011

❓FAQ

最も参考になるコメント

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

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

getPopupContainer={triggerNode => triggerNode.parentNode}を使用して、ポップオーバーコンテンツ内で選択したドロップダウンメニューをレンダリングできます。

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

3487

全てのコメント3件

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

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

getPopupContainer={triggerNode => triggerNode.parentNode}を使用して、ポップオーバーコンテンツ内で選択したドロップダウンメニューをレンダリングできます。

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

3487

動作します! これを公式の例に追加します。 ありがとう。

こんにちは
上記の方法を使用してみましたgetPopupContainer={(triggerNode: any) => triggerNode.parentNode} 結果

1556620903631-image
<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>

このページは役に立ちましたか?
0 / 5 - 0 評価