import selectDatasourceMixin from 'mars-pro/packages/pro-select/src/mixins/select-datasource';
import selectBaseMixin from 'mars-pro/packages/pro-select/src/mixins/select-base';
import ProSelectOptionList from './option-list';

export default {
  name: 'ProSelectList',
  componentName: 'ProSelectList',
  components: {
    ProSelectOptionList
  },
  mixins: [selectBaseMixin, selectDatasourceMixin],
  props: {
    enableVirtualList: {
      type: Boolean,
      default: true
    },
  },
  computed: {
    // 是否启用虚拟列表
    isEnableVirtualList() {
      const datas = this.filterDatas || []
      return this.enableVirtualList !== false && datas.length > 100
    }
  },
  render() {
    const content = <ProSelectOptionList/>
    return this.renderSelectWapper(content, {})
  }
}

