Adds type definitions. Makes it possible to hide the Chips.

old
James Browne 2016-11-24 11:09:39 +00:00
parent 350463c650
commit fb263f4072
4 changed files with 14 additions and 4 deletions

View File

@ -27,7 +27,7 @@ const factory = (Chip, Input) => {
onChange: PropTypes.func,
onQueryChange: PropTypes.func,
onFocus: PropTypes.func,
selectedPosition: PropTypes.oneOf(['above', 'below']),
selectedPosition: PropTypes.oneOf(['above', 'below', 'none']),
showSuggestionsWhenValueIsSet: PropTypes.bool,
source: PropTypes.any,
suggestionMatch: PropTypes.oneOf(['start', 'anywhere', 'word']),

View File

@ -72,11 +72,16 @@ interface AutocompleteProps extends ReactToolbox.Props {
* @default auto
*/
onChange?: Function;
/**
* Callback function that is fired when the components's query value changes.
* @default auto
*/
onQueryChange?: Function;
/**
* Determines if the selected list is shown above or below input. It can be above or below.
* @default above
*/
selectedPosition?: "above" | "below";
selectedPosition?: "above" | "below" | "none";
/**
* If true, the list of suggestions will not be filtered when a value is selected.
* @default false

View File

@ -442,7 +442,7 @@ var factory = function factory(Chip, Input) {
onChange: _react.PropTypes.func,
onQueryChange: _react.PropTypes.func,
onFocus: _react.PropTypes.func,
selectedPosition: _react.PropTypes.oneOf(['above', 'below']),
selectedPosition: _react.PropTypes.oneOf(['above', 'below', 'none']),
showSuggestionsWhenValueIsSet: _react.PropTypes.bool,
source: _react.PropTypes.any,
suggestionMatch: _react.PropTypes.oneOf(['start', 'anywhere', 'word']),

View File

@ -72,11 +72,16 @@ interface AutocompleteProps extends ReactToolbox.Props {
* @default auto
*/
onChange?: Function;
/**
* Callback function that is fired when the components's query value changes.
* @default auto
*/
onQueryChange?: Function;
/**
* Determines if the selected list is shown above or below input. It can be above or below.
* @default above
*/
selectedPosition?: "above" | "below";
selectedPosition?: "above" | "below" | "none";
/**
* If true, the list of suggestions will not be filtered when a value is selected.
* @default false