Skip to content

Commit

Permalink
Fixed #576
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici authored and Çağatay Çivici committed Sep 20, 2018
1 parent 9ecb55d commit 98c58cb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export class AutoComplete extends Component {
}

updateModel(event, value) {
const resolvedFieldData = this.props.field ? ObjectUtils.resolveFieldData(value, this.props.field) : undefined;
if(this.props.onChange) {
this.props.onChange({
originalEvent: event,
Expand All @@ -208,7 +207,7 @@ export class AutoComplete extends Component {
target: {
name: this.props.name,
id: this.props.id,
value: resolvedFieldData ? resolvedFieldData: value
value: value
}
});
}
Expand All @@ -234,11 +233,6 @@ export class AutoComplete extends Component {
updateInputField(value) {
const formattedValue = this.formatValue(value);
this.inputEl.value = formattedValue;

/*if (formattedValue && formattedValue.length)
DomHandler.addClass(this.container, 'p-inputwrapper-filled');
else
DomHandler.removeClass(this.container, 'p-inputwrapper-filled');*/
}

showPanel() {
Expand Down Expand Up @@ -510,7 +504,7 @@ export class AutoComplete extends Component {

this.searching = false;

if (this.input && !this.props.multiple) {
if (this.inputEl && !this.props.multiple) {
this.updateInputField(this.props.value);
}
}
Expand Down

0 comments on commit 98c58cb

Please sign in to comment.