react-input-completion
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "react-input-completion", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A cross-browser autocomplete component for React", | ||
@@ -5,0 +5,0 @@ "repository": "https://www.github.com/imcnally/react-input-completion", |
# react-input-completion | ||
A cross-browser autocomplete component for React. `<InputCompletion>` defaults to the native `<datalist>` and polyfills any unsupported browsers. | ||
A cross-browser autocomplete component for React. | ||
## Usage: | ||
`<InputCompletion>` defaults to the native `<datalist>` and polyfills any unsupported browsers, with no external dependencies. | ||
## Usage | ||
`<InputCompletion>` wraps an input, and connects it to a list of `options`. | ||
### Example | ||
```jsx | ||
// in your component's render function | ||
var browsers = ['Chrome', 'Firefox', 'IE', 'Safari']; | ||
var onChange = this.onChange.bind(this); | ||
<InputCompletion options={browsers} name="browsers" onValueChange={onChange}> | ||
<input placeholder="Enter your browser name" /> | ||
</InputCompletion> | ||
``` | ||
### Props | ||
`onValueChange` - Callback function for when input value changes. Arguments: DOMEvent, value. | ||
`options` - Array of suggestions to present to the user | ||
`name` - Unique identifier for the list | ||
```jsx | ||
<InputCompletion options={} name=''> | ||
<input /> | ||
</InputCompletion> | ||
``` | ||
### Styles | ||
Default styles (for fallback to match native) are available in react-input-completion.css. | ||
Default styles (for fallback to match native | ||
) are available in react-input-completion.css. | ||
@@ -22,0 +34,0 @@ ## Development |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11022
51
0