Fixed Autocomplete such that it does not error when provided with a value prop that does not exist in the source prop.
parent
4e1e3d6009
commit
59b01e640f
|
@ -154,7 +154,7 @@ const factory = (Chip, Input) => {
|
|||
|
||||
suggestions () {
|
||||
let suggest = new Map();
|
||||
const query = this.state.query.toLowerCase().trim() || '';
|
||||
const query = (this.state.query || (!this.props.multiple ? this.props.value : '')).toLowerCase().trim() || '';
|
||||
const values = this.values();
|
||||
const source = this.source();
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ var factory = function factory(Chip, Input) {
|
|||
key: 'suggestions',
|
||||
value: function suggestions() {
|
||||
var suggest = new Map();
|
||||
var query = this.state.query.toLowerCase().trim() || '';
|
||||
var query = (this.state.query || (!this.props.multiple ? this.props.value : '')).toLowerCase().trim() || '';
|
||||
var values = this.values();
|
||||
var source = this.source();
|
||||
|
||||
|
|
Loading…
Reference in New Issue