Merge pull request #395 from catchonme/master

select增加选项默认展开状态
This commit is contained in:
liaoxuezhi 2019-12-20 18:04:38 +08:00 committed by GitHub
commit f9f0efe15d
2 changed files with 3 additions and 1 deletions

View File

@ -201,6 +201,7 @@ interface SelectProps extends OptionProps {
checkAllLabel?: string;
defaultCheckAll?: boolean;
simpleValue?: boolean;
defaultOpen?: boolean;
}
interface SelectState {
@ -258,7 +259,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
this.handleDeleteClick = this.handleDeleteClick.bind(this);
this.state = {
isOpen: false,
isOpen: props.defaultOpen || false,
isFocused: false,
inputValue: '',
highlightedIndex: -1,

View File

@ -12,6 +12,7 @@ import {dataMapping} from '../../utils/tpl-builtin';
export interface SelectProps extends OptionsControlProps {
autoComplete?: Api;
searchable?: boolean;
defaultOpen?: boolean;
}
export default class SelectControl extends React.Component<SelectProps, any> {