v14.2.0

Playroom

Github

TokenInput

View Source

Allow users to add and delete multiple items, optionally using autocompletion as they type to find each item when paired with Combobox.Popover.

apple
pears
oranges
bananas
kiwis
Copy
Edit
Copy
Edit

Props

tokensArray

array | defaults to null Controlled set of tokens.

onChangeFunction

function(event: { added: boolean token: any, tokenIndex: number, tokens: array, }) Callback when a token has been added or removed.

renderTokenFunction

function(token: any, { removeToken: func, selectFirstToken: func, selectLastToken: func, selectNextToken: func, selectPreviousToken: func, tokenIndex: number }) Control how a token is rendered. As long as this function returns a string, it will use a default badge, otherwise pass any custom component and functionality you need.

renderInputFunction

function(inputProps: object) Control how the internal input is rendered, inputProps must be passed through to the rendered input.

  • Props
PreviousTimeField