diff --git a/src/components/easySelect/index.tsx b/src/components/easySelect/index.tsx index ef510e2e6..43dc56b35 100644 --- a/src/components/easySelect/index.tsx +++ b/src/components/easySelect/index.tsx @@ -9,6 +9,7 @@ interface EasySelectProps { dataSource?: any[]; clearValueRequest?: boolean; isLazy?: boolean; + auto?: boolean; filterLocal?: boolean; servise?: (str: string) => Promise; } @@ -27,15 +28,15 @@ class EasySelect extends React.Component { - const { autoValue = '', dataSource = [] } = this.props; + const { autoValue = '', dataSource = [], auto = false } = this.props; if (dataSource.length > 0) { this.lazyDataSource(dataSource) - } else { + } else if(auto) { this.getDataSource(autoValue); } }