diff --git a/src/app/modules/angular-slickgrid/editors/autoCompleteEditor.ts b/src/app/modules/angular-slickgrid/editors/autoCompleteEditor.ts index d89780785..5b68efbff 100644 --- a/src/app/modules/angular-slickgrid/editors/autoCompleteEditor.ts +++ b/src/app/modules/angular-slickgrid/editors/autoCompleteEditor.ts @@ -160,8 +160,9 @@ export class AutoCompleteEditor implements Editor { serializeValue() { // if user provided a custom structure, we will serialize the value returned from the object with custom structure + const minLength = typeof this.editorOptions.minLength !== 'undefined' ? this.editorOptions.minLength : 3; if (this.editorOptions.forceUserInput) { - this._currentValue = this.$input.val().length > 3 ? this.$input.val() : this._currentValue; + this._currentValue = this.$input.val().length >= minLength ? this.$input.val() : this._currentValue; } if (this.customStructure && this._currentValue.hasOwnProperty(this.labelName)) { return this._currentValue[this.labelName];