Quantcast
Channel: User Just code - Stack Overflow
Viewing all articles
Browse latest Browse all 41

Answer by Just code for Antd select and autocomplete list elements 'stick' on inner element scroll

$
0
0

As per the author comment you need to set the position relative to container and set the container as popup container, there is property called getPopupContainer in this plugin.

like this

<div id="testPosition" style={{ position: 'relative' }}>            hello<Select              getPopupContainer={() => document.getElementById("testPosition")}              style={{ width: 100 }}><Option value="jack">jack</Option><Option value="lucy">lucy</Option><Option value="yiminghe">yiminghe</Option></Select></div>

Demo


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>