virtual-antd-select

使用IntersectionObserve虚拟滚动解决基于antd3.X的Select下拉组件大数据量卡顿情况

Usage no npm install needed!

<script type="module">
  import virtualAntdSelect from 'https://cdn.skypack.dev/virtual-antd-select';
</script>

README

antd>select component show slow on focus, use virtual scroll to slove it

    1. npm i virtual-antd-select
    1. import { VSelect } from 'virtual-antd-select'
    1. <VSelect ...props>

javascript
VSelect props /**

  • Select的showSearch,是否可以输入检索 / showSearch: boolean, /*
  • Select的placeholder,默认值为“请选择” / placeholder?: string, /*
  • 需要加载到Select的全量数据 / optionList: Array, /*
  • Option的Value属性名 / valueProp: string, /*
  • Option展示的文本属性名 / displayProp: string, /*
  • 真实加载到dom中的数据长度,默认值为20 / viewListLength?: number, /*
  • Select下拉每一个选项的高度,默认值为32 / optionHeight?: number, /*
  • Select的选中事件 */ onSelectChange: (value: any) => void,