Skip to content

Commit

Permalink
Merge pull request #14661 from primefaces/issue-14595
Browse files Browse the repository at this point in the history
Fixed #14595 - Autocomplete | maxlength doesn't work anymore
  • Loading branch information
cetincakiroglu authored Feb 1, 2024
2 parents 612ddb5 + 379a207 commit d14473c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
clearTimeout(this.searchTimeout);
}

let query = event.target.value;
let query = event.target.value.split('').slice(0, this.maxlength).join('');

if (!this.multiple && !this.forceSelection) {
this.updateModel(query);
Expand Down Expand Up @@ -1622,3 +1622,4 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
declarations: [AutoComplete]
})
export class AutoCompleteModule {}

0 comments on commit d14473c

Please sign in to comment.