Skip to content

Commit

Permalink
Fixed #9481 - Rename filterMode to filterMatchMode in Listbox
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Nov 2, 2020
1 parent 1144267 commit 95bd4c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/components/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class Listbox implements AfterContentInit, ControlValueAccessor {

@Input() filter: boolean = false;

@Input() filterMode: string = 'contains';
@Input() filterMatchMode: string = 'contains';

@Input() filterLocale: string;

Expand Down Expand Up @@ -426,7 +426,7 @@ export class Listbox implements AfterContentInit, ControlValueAccessor {

filterOptions() {
if (this.hasFilter() && this._options)
this._filteredOptions = this._options.filter(option => FilterUtils[this.filterMode](this.getOptionLabel(option), this._filterValue, this.filterLocale));
this._filteredOptions = this._options.filter(option => FilterUtils[this.filterMatchMode](this.getOptionLabel(option), this._filterValue, this.filterLocale));
else
this._filteredOptions = null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/components/listbox/listboxdemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h5>Disabled Options</h5>

<h5>Filter</h5>
<p>Filtering allows searching items in the list using an input field at the header. In order to use filtering, set <i>filter</i> property as true. Default filtering
mode is "contains" and alternatives are available via the <i>filterMode</i> property. See property documentation for more information.</p>
mode is "contains" and alternatives are available via the <i>filterMatchMode</i> property. See property documentation for more information.</p>

<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;p-listbox [options]="cities" [(ngModel)]="selectedCity" [filter]="true"&gt;&lt;/p-listbox&gt;
Expand Down

0 comments on commit 95bd4c2

Please sign in to comment.