Fix allowCreate in Autocomplete when value prop is an object (#1334)

old
Mikko Matilainen 2017-04-02 15:12:48 +03:00 committed by Javi Velasco
parent 73bf3be741
commit da85a69e52
1 changed files with 4 additions and 0 deletions

View File

@ -300,6 +300,10 @@ const factory = (Chip, Input) => {
return obj;
}, {});
if (Object.keys(newItem).length === 0 && newValue) {
newItem[newValue] = newValue;
}
return this.handleChange(Object.assign(this.mapToObject(values), newItem), event);
}