UNPKG

1.91 kBTypeScriptView Raw
1import * as React from 'react';
2import { PickOptional } from '../../helpers/typeUtils';
3import { OUIAProps } from '../../helpers';
4export interface FormSelectProps extends Omit<React.HTMLProps<HTMLSelectElement>, 'onChange' | 'onBlur' | 'onFocus' | 'disabled'>, OUIAProps {
5 /** content rendered inside the FormSelect */
6 children: React.ReactNode;
7 /** additional classes added to the FormSelect control */
8 className?: string;
9 /** value of selected option */
10 value?: any;
11 /** Value to indicate if the select is modified to show that validation state.
12 * If set to success, select will be modified to indicate valid state.
13 * If set to error, select will be modified to indicate error state.
14 */
15 validated?: 'success' | 'warning' | 'error' | 'default';
16 /** Flag indicating the FormSelect is disabled */
17 isDisabled?: boolean;
18 /** Sets the FormSelect required. */
19 isRequired?: boolean;
20 /** Use the external file instead of a data URI */
21 isIconSprite?: boolean;
22 /** Optional callback for updating when selection loses focus */
23 onBlur?: (event: React.FormEvent<HTMLSelectElement>) => void;
24 /** Optional callback for updating when selection gets focus */
25 onFocus?: (event: React.FormEvent<HTMLSelectElement>) => void;
26 /** Optional callback for updating when selection changes */
27 onChange?: (value: string, event: React.FormEvent<HTMLSelectElement>) => void;
28 /** Custom flag to show that the FormSelect requires an associated id or aria-label. */
29 'aria-label'?: string;
30}
31export declare class FormSelect extends React.Component<FormSelectProps, {
32 ouiaStateId: string;
33}> {
34 static displayName: string;
35 constructor(props: FormSelectProps);
36 static defaultProps: PickOptional<FormSelectProps>;
37 handleChange: (event: any) => void;
38 render(): JSX.Element;
39}
40//# sourceMappingURL=FormSelect.d.ts.map
\No newline at end of file