boundless-tokenized-input v1.1.0
THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD.
TokenizedInput
Distill rich entity data matched via typeahead input into simple visual abstractions.
Basic usage of this component is identical to that of Typeahead. Additional props are available to take advantage of the tokenization functionality.
Component Instance Methods
When using TokenizedInput
in your project, you may call the following methods on a rendered instance of the component. Use refs
to get the instance.
add(index: number)
programmatically creates a token forprops.entities[index]
;props.handleAddToken
will be called as a hint to persist the change in your controller view or other application statefocus()
focuses the browser oon the underlying textual input for immediate text entrygetInputNode()
returns the raw underlying textual input DOM nodegetSelectedEntityText()
returns thetext
property of the currently highlighted entity (fromprops.entities
), or returns an empty stringgetValue()
retrieves the current value of the underlying textual inputremove(index: number)
programmatically removes the token forprops.entities[index]
;props.handleRemoveTokens
will be called as a hint to persist the change in your controller view or other application stateselect()
programmatically creates a full selection on the underlying textual input such that a press of the Backspace key would fully clear the inputsetValue(value: string)
sets the underlying textual input to the specified text and updates internal state; do not use this method when usingTypeahead
as a "controlled input"
Props
Note: only top-level props are in the README, for the full list check out the website.
Required Props
There are no required props.
Optional Props
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago