diff --git a/README.md b/README.md index 733abc66..07a429da 100644 --- a/README.md +++ b/README.md @@ -55,179 +55,154 @@ Type: React Component Basic typeahead input and results list. -#### props.options - -Type: `Array` +Typeahead (props) | Type +------------ | ------------ +| options | Array | +| defaultValue |String | +| value | String | +| maxVisible | Number| +| resultsTruncatedMessage | String| +| customClasse | Object | +| placeholder | String | +| disabled | Boolean | +| textarea | Boolean | +| inputProps | Object| +| onKeyDown | Function| +| onKeyPress | Function | +| onKeyUp | Function| +| onBlur| Function | +| onFocus | Function| +| onOptionSelected | Function| +| filterOption | String or Function | +| displayOption | String or Function | +| formInputOption | String or Function | +| defaultClassNames | Boolean | +| customListComponent | React Component | +| showOptionsWhenEmpty | Boolean | +| allowCustomValues | Boolean | + + +#### props.options +Type: `Array` Default: [] +An array supplied to the filtering function. Can be a list of strings or a list of arbitrary objects. +in the latter case,`filterOption` and `displayOption` should be provided. -An array supplied to the filtering function. Can be a list of strings or a list of arbitrary objects. In the latter case, `filterOption` and `displayOption` should be provided. - -#### props.defaultValue - +#### props.defaultValue Type: `String` +A default value used when the component has no value. If it matches any options a option list will show.| -A default value used when the component has no value. If it matches any options a option list will show. - -#### props.value - +#### props.value Type: `String` - Specify a value for the text input. -#### props.maxVisible - +#### props.maxVisible Type: `Number` +Limit the number of options rendered in the results list.| -Limit the number of options rendered in the results list. - -#### props.resultsTruncatedMessage - +#### props.resultsTruncatedMessage Type: `String` - If `maxVisible` is set, display this custom message at the bottom of the list of results when the result are truncated. -#### props.customClasses - +#### props.customClasses Type: `Object` Allowed Keys: `input`, `results`, `listItem`, `listAnchor`, `hover`, `typeahead`, `resultsTruncated` - An object containing custom class names for child elements. Useful for integrating with 3rd party UI kits. -#### props.placeholder - +#### props.placeholder Type: `String` - Placeholder text for the typeahead input. -#### props.disabled - +#### props.disabled Type: `Boolean` - Set to `true` to add disable attribute in the `` or `