select增加选项默认展开状态

This commit is contained in:
catchonme 2019-12-20 14:25:18 +08:00
parent dfc96af116
commit 791d8574c1
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> {