Skip to content

Commit dd1c66f

Browse files
Ivan KitanovIvan Kitanov
authored andcommitted
chore(combo): Moving the disableFiltering property to combo.common
1 parent eed2609 commit dd1c66f

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes for each version of this project will be documented in this
44

55
## 19.2.0
66

7+
### New Features
8+
- `IgxSimpleCombo`
9+
- Added `disableFiltering` to the `IgxSimpleCombo`, which enables/disables the filtering in the list. The default is `false`.
10+
711
### General
812
- `IgxCarousel`
913
- Removed deprecated property `keyboardSupport`.

projects/igniteui-angular/src/lib/combo/combo.common.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ export abstract class IgxComboBaseDirective implements IgxComboBase, AfterViewCh
123123
@Input({ transform: booleanAttribute })
124124
public showSearchCaseIcon = false;
125125

126+
/**
127+
* Enables/disables filtering in the list. The default is `false`.
128+
*/
129+
@Input({ transform: booleanAttribute })
130+
public get disableFiltering(): boolean {
131+
return this._disableFiltering;
132+
}
133+
public set disableFiltering(value: boolean) {
134+
this._disableFiltering = value;
135+
}
136+
137+
126138
/**
127139
* Set custom overlay settings that control how the combo's list of items is displayed.
128140
* Set:
@@ -945,6 +957,7 @@ export abstract class IgxComboBaseDirective implements IgxComboBase, AfterViewCh
945957
protected computedStyles;
946958

947959
private _id: string = `igx-combo-${NEXT_ID++}`;
960+
private _disableFiltering = false;
948961
private _type = null;
949962
private _dataType = '';
950963
private _itemHeight = undefined;

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,6 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
128128
@Input({ transform: booleanAttribute })
129129
public autoFocusSearch = true;
130130

131-
/**
132-
* Enables/disables filtering in the list. The default is `false`.
133-
*/
134-
@Input({ transform: booleanAttribute })
135-
public get disableFiltering(): boolean {
136-
return this._disableFiltering || this.filteringOptions.filterable === false;
137-
}
138-
public set disableFiltering(value: boolean) {
139-
this._disableFiltering = value;
140-
}
141-
142131
/**
143132
* Defines the placeholder value for the combo dropdown search field
144133
*
@@ -184,7 +173,6 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
184173
protected _prevInputValue = '';
185174

186175
private _displayText: string;
187-
private _disableFiltering = false;
188176

189177
constructor(
190178
elementRef: ElementRef,

projects/igniteui-angular/src/lib/simple-combo/simple-combo.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
(focus)="dropdown.onFocus()" (keydown)="handleItemKeyDown($event)">
6969
<igx-combo-item [role]="item?.isHeader? 'group' : 'option'" [singleMode]="true"
7070
[itemHeight]="itemHeight" (click)="handleItemClick()" *igxFor="let item of data
71-
| comboFiltering:filterValue:displayKey:filteringOptions:filterFunction
71+
| comboFiltering:filterValue:displayKey:filteringOptions:filterFunction:disableFiltering
7272
| comboGrouping:groupKey:valueKey:groupSortingDirection:compareCollator;
7373
index as rowIndex; initialChunkSize: 10; containerSize: itemsMaxHeight || containerSize; itemSize: itemHeight || itemSize; scrollOrientation: 'vertical';"
7474
[value]="item" [isHeader]="item?.isHeader" [index]="rowIndex">

projects/igniteui-angular/src/lib/simple-combo/simple-combo.component.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
115115

116116
private _collapsing = false;
117117

118-
private _disableFiltering = false;
119-
120-
/**
121-
* Enables/disables filtering in the list. The default is `false`.
122-
*/
123-
@Input({ transform: booleanAttribute })
124-
public get disableFiltering(): boolean {
125-
return this._disableFiltering;
126-
}
127-
public set disableFiltering(value: boolean) {
128-
this._disableFiltering = value;
129-
}
130-
131118
/** @hidden @internal */
132119
public get filteredData(): any[] | null {
133120
return this._filteredData;

0 commit comments

Comments
 (0)