Merge pull request #1646 from AlexanderOtavka/patch-1

Fix mixed up type definitions for Dropdown
old
Rubén Moya 2018-01-23 18:24:12 +01:00 committed by GitHub
commit aeacbabbce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 11 deletions

View File

@ -30,10 +30,6 @@ export interface DropdownTheme {
* Used for the the label element. * Used for the the label element.
*/ */
label?: string; label?: string;
/**
* Used for setting the label from source
*/
labelKey?: string;
/** /**
* Used when dropdown has required attribute. * Used when dropdown has required attribute.
*/ */
@ -58,10 +54,6 @@ export interface DropdownTheme {
* Used for the list of values. * Used for the list of values.
*/ */
values?: string; values?: string;
/**
* Used for setting the value from source
*/
valueKey: string;
} }
export interface DropdownProps extends ReactToolbox.Props { export interface DropdownProps extends ReactToolbox.Props {
@ -88,6 +80,10 @@ export interface DropdownProps extends ReactToolbox.Props {
* The text string to use for the floating label element. * The text string to use for the floating label element.
*/ */
label?: string; label?: string;
/**
* Used for setting the label from source
*/
labelKey?: string;
/** /**
* Name for the input field. * Name for the input field.
*/ */
@ -104,6 +100,11 @@ export interface DropdownProps extends ReactToolbox.Props {
* Callback function that is fired when the component is focused. * Callback function that is fired when the component is focused.
*/ */
onFocus?: Function; onFocus?: Function;
/**
* If true, the dropdown has a required attribute.
* @default false
*/
required?: boolean;
/** /**
* Array of data objects with the data to represent in the dropdown. * Array of data objects with the data to represent in the dropdown.
*/ */
@ -121,10 +122,9 @@ export interface DropdownProps extends ReactToolbox.Props {
*/ */
value?: string | number; value?: string | number;
/** /**
* If true, the dropdown has a required attribute. * Used for setting the value from source
* @default false
*/ */
required?: boolean; valueKey?: string;
} }
export class Dropdown extends React.Component<DropdownProps, {}> { } export class Dropdown extends React.Component<DropdownProps, {}> { }