UNPKG

@aappddeevv/dynamics-client-ui

Version:

## What is it? A library to help you create great dynamics applications.

43 lines (42 loc) 1.18 kB
/// <reference types="react" /> /** Simple <select> with null option. */ import * as React from "react"; /** Options for select. */ export interface Option { value: string; label: string; } export interface ElProps { select?: { component?: React.ReactType; className?: string; props?: { [pname: string]: any; }; }; option?: { component?: React.ReactType; className?: string; props?: { [pname: string]: any; }; }; } export declare const DefaultElProps: ElProps; /** If a NULL is used in the select, this is the explicit value. */ export declare const NULL_OPTION_VALUE = "NULL"; export interface Props { options: Array<Option>; /** If not set, first option is shown. */ value?: string; /** Use this if you want uncontrolled */ defaultValue?: string; /** Default is false. */ addNullOption?: boolean; /** Takes the value as argument, possible including NULL_OPTION_VALUE */ onChange: (o: string) => void; /** Props for the element */ components?: ElProps; } export declare const Select: React.SFC<Props>; export default Select;