import InputControl from "./InputControl"; import { ComponentFactory, ValueOrAsync } from "../../ComponentFactory"; import TextLabelFactory from "../../TextLabelFactory"; /** Represents a native dropdown selection field control (default 100% width) */ export declare class SelectField extends InputControl { /** Create a select field element */ constructor(name?: string, label?: string | TextLabelFactory, options?: SelectField.Option[]); /** Initialize a select field control factory with given values */ static with: (values: SelectField.Initializer) => ComponentFactory; /** Initialize a select field control factory with given name, label, and options */ static withOptions(name: string, label?: string | TextLabelFactory, options?: ValueOrAsync): ComponentFactory; /** Initialize with given (observable) values; returns this */ initializeWith: (values: SelectField.Initializer) => this; /** List of options and their values (observed) */ options: (SelectField.Option | undefined | null)[]; /** Currently selected value (read/write observable) */ value: string; /** Returns an object containing all current values of input elements (observable) */ getFormValues(result?: {}): {}; /** Sets all input values by element name (will not trigger observable) */ setFormValues(values: any): void; protected focus(): void; protected blur(): void; private _selectElement; private _labelElement; private _observedValue; private _initValueSet; } export declare namespace SelectField { /** Represents a select field option */ interface Option { /** Selection value */ value?: string; /** Text label */ text: string | TextLabelFactory; } } export declare namespace SelectField { /** Initializer for .with({ ... }) */ interface Initializer extends InputControl.Initializer { /** Property initializer */ options: ValueOrAsync; } } export default SelectField;