Skip to content

Instantly share code, notes, and snippets.

@smykes
Last active July 24, 2016 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smykes/8df32256ce7db95188c65f524f177cfe to your computer and use it in GitHub Desktop.
Save smykes/8df32256ce7db95188c65f524f177cfe to your computer and use it in GitHub Desktop.
class AutoComplete extends React.Component {
_getChoices() {
let ret = [];
for (var i = 0; i < this.props.suggestions.length; i++) {
ret.push(<AutoCompleteChoice onClick={this.pick}>)
}
return ret;
}
render() {
let listItem = this._getChoices();
return (
<section>
<ul>
{listItem}
</ul>
</section>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment