UNPKG

ukelli-ui

Version:

Base on React's UI lib. Make frontend's dev simpler and faster.

43 lines (42 loc) 1.27 kB
/// <reference types="react" /> import { InputProps } from './input'; import { DropdownPosition } from '../selector/dropdown-menu'; import { SelectorBasicProps } from '../selector/selector'; import FormControlBasic from './form-control-basic'; export interface InputSelectorProps extends SelectorBasicProps { /** 传入 input 控件的 props */ inputProps?: InputProps; /** Input 控件的输出值的类型 */ outputType?: InputProps['outputType']; /** Selector's position */ position?: DropdownPosition; /** onChange */ onChange: (inputVal: any, selectorVal: any) => void; } interface InputSelectorState { /** 选择器的值 */ selectRef: any; /** 输入控件的值 */ inputVal: any; } /** * 选择器 + 输入控件 * * @export * @class InputSelector * @extends {Component} */ export default class InputSelector extends FormControlBasic<InputSelectorProps, InputSelectorState> { static defaultProps: { inputProps: {}; }; _input: any; constructor(props: any); changeRef: (selectorVal: any) => void; focus(): void; changeInput: (val: any) => void; emitChange: (inputVal: any, selectRef?: any) => void; saveInput: (e: any) => void; render(): JSX.Element; } export {};