Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
react-typeahead-tokenizer
Advanced tools
This was originally a fork of https://github.com/fmoo/react-typeahead
react-typeahead-tokenizer is a javascript library that provides a react-based typeahead, or autocomplete text entry, as well as a "typeahead tokenizer", a typeahead that allows you to select multiple results.
For a typeahead input:
import { Typeahead } from 'react-typeahead';
React.render(
<Typeahead
options={['John', 'Paul', 'George', 'Ringo']}
maxVisible={2}
/>
);
For a tokenizer typeahead input:
import { Tokenizer } from 'react-typeahead';
React.render(
<Tokenizer
options={['John', 'Paul', 'George', 'Ringo']}
onTokenAdd={token => console.log('token added: ', token)}
/>
);
Type: React Component
Basic typeahead input and results list.
Type: Array
Default: []
An array supplied to the filtering function.
Type: String
A default value used when the component has no value. If it matches any options a option list will show.
Type: String
Specify a value for the text input.
Type: Number
Limit the number of options rendered in the results list.
Type: String
If maxVisible
is set, display this custom message at the bottom of the list of results when the result are truncated.
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.
Type: String
Placeholder text for the typeahead input.
Type: Boolean
Set to true
to add disable attribute in the <input>
element
Type: Object
Props to pass directly to the <input>
element.
Type: Function
Event handler for the keyDown
event on the typeahead input.
Type: Function
Event handler for the keyPress
event on the typeahead input.
Type: Function
Event handler for the keyUp
event on the typeahead input.
Type: Function
Event handler for the blur
event on the typeahead input.
Type: Function
Event handler for the focus
event on the typeahead input.
Type: Function
Event handler triggered whenever a user picks an option.
Type: boolean
Default: true
If false, the default classNames are removed from the typeahead.
Type: boolean
Default: false
If true, options will still be rendered when there is no value.
Type: number
If 1, custom tags can be added without a matching typeahead selection
Type: React Component
Typeahead component that allows for multiple options to be selected.
Type: Array
Default: []
An array supplied to the filter function.
Type: Number
Limit the number of options rendered in the results list.
Type: String
If maxVisible
is set, display this custom message at the bottom of the list of results when the result are truncated.
Type: String
The name for HTML forms to be used for submitting the tokens' values array.
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.
Type: String
Placeholder text for the typeahead input.
Type: Boolean
Set to true
to add disable attribute in the <input>
element
Type: Object
Props to pass directly to the <input>
element.
Type: Function
Event handler for the keyDown
event on the typeahead input.
Type: Function
Event handler for the keyPress
event on the typeahead input.
Type: Function
Event handler for the keyUp
event on the typeahead input.
Type: Function
Event handler for the blur
event on the typeahead input.
Type: Function
Event handler for the focus
event on the typeahead input.
Type: Array
A set of values of tokens to be loaded on first render.
Type: Function
Params: (removedToken)
Event handler triggered whenever a token is removed.
Type: Function
Params: (addedToken)
Event handler triggered whenever a token is removed.
Type: boolean
Default: true
If false, the default classNames are removed from the tokenizer and the typeahead.
First you'll need NPM, then clone the repository.
Once that's done, to get started, run npm install
in your checkout directory.
Use npm run build
to generate the dist file.
Use npm test
to run the tests.
Fork the repository and send a pull request!
FAQs
React-based typeahead and typeahead-tokenizer
The npm package react-typeahead-tokenizer receives a total of 18 weekly downloads. As such, react-typeahead-tokenizer popularity was classified as not popular.
We found that react-typeahead-tokenizer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.