antd 组件 select 分页懒加载 onPopupScroll

<Select
value={this.state.value}
placeholder="请输入关键字"
showSearch
filterOption={false}
onPopupScroll={(e)=>{
const { target } = e;
// target.scrollTop + target.offsetHeight === target.scrollHeight 判断是否滑动到底部
if( target.scrollTop + target.offsetHeight === target.scrollHeight){
// 在这里调用接口
}
}}
>
{list.map(item) => <Option key={item.id}>{item.name}</Option>}
</Select>

原文地址:https://www.cnblogs.com/chenlongsheng/p/15330554.html