From 76d51273b4cc4100d34cb8da8e83265527494925 Mon Sep 17 00:00:00 2001 From: Michael Frye Date: Tue, 11 Aug 2015 13:36:39 -0700 Subject: [PATCH] Add entryValue to customListComponent --- README.md | 4 +++- src/typeahead/index.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 516644a5..250af544 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,9 @@ This component receives the following props : - `props.options` - This is the Typeahead's `props.options` filtered and limited to `Typeahead.props.maxVisible`. - `props.selectedIndex` - - The index of the highlighted option for rendering + - The index of the highlighted option for rendering. + `props.entryValue` + The input value as it's entered. ### Typeahead ([Exposed Component Functions][reactecf]) diff --git a/src/typeahead/index.js b/src/typeahead/index.js index 0e220edb..27eb9e5c 100644 --- a/src/typeahead/index.js +++ b/src/typeahead/index.js @@ -145,6 +145,7 @@ var Typeahead = React.createClass({ onOptionSelected={this._onOptionSelected} customValue={this._getCustomValue()} customClasses={this.props.customClasses} + entryValue={this.state.entryValue} selectionIndex={this.state.selectionIndex} defaultClassNames={this.props.defaultClassNames} displayOption={this._generateOptionToStringFor(this.props.displayOption)} />