forked from p96170835/amis
select增加选项默认展开状态
This commit is contained in:
parent
dfc96af116
commit
791d8574c1
|
@ -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,
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in New Issue