Skip to content

Commit 7a479ed

Browse files
Ivan KitanovIvan Kitanov
authored andcommitted
chore(combo): Moving the disableFiltering property to combo.common
1 parent 5eefc36 commit 7a479ed

File tree

5 files changed

+17
-25
lines changed

5 files changed

+17
-25
lines changed

CHANGELOG.md

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

4444
## 19.2.0
4545

46+
### New Features
47+
- `IgxSimpleCombo`
48+
- Added `disableFiltering` to the `IgxSimpleCombo`, which enables/disables the filtering in the list. The default is `false`.
49+
4650
### General
4751
- `IgxCarousel`
4852
- Removed deprecated property `keyboardSupport`.

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ 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+
126137
/**
127138
* Set custom overlay settings that control how the combo's list of items is displayed.
128139
* Set:
@@ -945,6 +956,7 @@ export abstract class IgxComboBaseDirective implements IgxComboBase, AfterViewCh
945956
protected computedStyles;
946957

947958
private _id: string = `igx-combo-${NEXT_ID++}`;
959+
private _disableFiltering = false;
948960
private _type = null;
949961
private _dataType = '';
950962
private _itemHeight = undefined;

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +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-
}
141131

142132
/**
143133
* Defines the placeholder value for the combo dropdown search field
@@ -184,7 +174,6 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
184174
protected _prevInputValue = '';
185175

186176
private _displayText: string;
187-
private _disableFiltering = false;
188177

189178
constructor(
190179
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
@@ -116,19 +116,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
116116

117117
private _collapsing = false;
118118

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

0 commit comments

Comments
 (0)