Last active
October 1, 2015 11:57
-
-
Save Bernardstanislas/385ceaa831e3e6d8570b to your computer and use it in GitHub Desktop.
Autocomplete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentWillReceiveProps: function componentWillReceiveProps(nextProps) { | |
var pickList = nextProps.pickList; | |
var code = nextProps.code; | |
var newValue = nextProps.value; | |
var value = this._getValueFromCode(code, pickList); | |
if ('' === value && newValue) { | |
value = newValue; | |
} | |
this.setState({ value: value }); | |
this._awesomeplete._list = this._extractListFromData(pickList); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment