Skip to content

Commit

Permalink
docs(examples): use selectedItem for values (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespen authored and Kent C. Dodds committed Sep 18, 2017
1 parent a5193c3 commit 85389b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions stories/examples/multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,24 @@ class MultipleAutocomplete extends React.Component {
const indices = mapItemIndex(items, values)

return (
<Autocomplete inputValue={this.state.input} onChange={this.handleChange}>
<Autocomplete
inputValue={this.state.input}
onChange={this.handleChange}
selectedItem={values}
>
{({
getInputProps,
getItemProps,
getRootProps,
getLabelProps,
highlightedIndex,
isOpen,
selectedItem,
}) => (
<Root {...getRootProps({refKey: 'innerRef'})}>
<Label {...getLabelProps()}>What are your favorite colors?</Label>
<InputWrapper>
{values.map((value, i) => (
{selectedItem.map((value, i) => (
<span
key={i}
style={{
Expand Down

0 comments on commit 85389b7

Please sign in to comment.