Skip to content

A typeahead input field for selecting & displaying styled variables from an array

Notifications You must be signed in to change notification settings

schester44/draftjs-typeahead-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typeahead Input Field

This package likely needs refactored before it will be useful to others.

The main purpose of this package, currently, is to render an ant design Input field with "variables" that are displayed as "pills". It uses draft-js to do the heavy lifting. The trigger word is {{, typing that will display a dropdown that has typeahead support for selecting one of the options passed to dropdownOptions

Example

const [inputValue, setInputValue] = useState("")
const VARIABLES = ["some", "options", "here"]

<TypeaheadEditor dropdownOptions={VARIABLES} value={inputValue} onChange={setInputValue} />

About

A typeahead input field for selecting & displaying styled variables from an array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published