Skip to content

Commit f7d9581

Browse files
authored
chore(filtering): Deprecated filterGlobal (#15016) (#15064)
* chore(filtering): Deprecated filterGlobal (#15016)
1 parent a468fb7 commit f7d9581

File tree

6 files changed

+6
-15
lines changed

6 files changed

+6
-15
lines changed

CHANGELOG.md

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

55
## 19.0.0
6+
### General
7+
- `IgxFilteringService`, `IgxGridBaseDirective`
8+
- **Deprecation** The `filterGlobal` method has been deprecated and will be removed in a future version.
69
### New Features
710
- `IgxColumn`
811
- Introduced the `disabledSummaries` property, allowing users to specify which summaries should be disabled for a given column. This property accepts an array of strings corresponding to the summary keys, enabling selective control over both default summaries (e.g., 'Count', 'Min') and any custom summaries created by the user.

projects/igniteui-angular/src/lib/grids/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ Here is a list of all public methods exposed by **igx-grid**:
273273
|`updateRow(value: any, rowIndex: number)`|Updates the row object and the data source record with the passed value.|
274274
|`updateCell(value: any, rowIndex: number, column: string)`|Updates the cell object and the record field in the data source.|
275275
|`filter(name: string, value: any, conditionOrExpressionTree?: IFilteringOperation | IFilteringExpressionsTree, ignoreCase?: boolean)`|Filters a single column. A filtering condition or filtering expressions tree could be used. Check the available [filtering conditions](#filtering-conditions)|
276-
|`filterGlobal(value: any, condition?, ignoreCase?)`|Filters all the columns in the grid with the same condition.|
277276
|`clearFilter(name?: string)`|If `name` is provided, clears the filtering state of the corresponding column, otherwise clears the filtering state of all columns.|
278277
|`sort(expression: ISortingExpression)`|Sorts a single column.|
279278
|`sort(expressions: Array)`|Sorts the grid columns based on the provided array of sorting expressions.|

projects/igniteui-angular/src/lib/grids/filtering/grid-filtering.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ export class IgxFilteringService implements OnDestroy {
287287

288288
/**
289289
* Filters all the `IgxColumnComponent` in the `IgxGridComponent` with the same condition.
290+
* @deprecated in version 19.0.0.
290291
*/
291292
public filterGlobal(value: any, condition, ignoreCase?) {
292293
if (!condition) {

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4930,6 +4930,7 @@ export abstract class IgxGridBaseDirective implements GridType,
49304930
* @param value
49314931
* @param condition
49324932
* @param ignoreCase
4933+
* @deprecated in version 19.0.0.
49334934
*/
49344935
public filterGlobal(value: any, condition, ignoreCase?) {
49354936
this.filteringService.filterGlobal(value, condition, ignoreCase);

src/app/grid-events/grid-events.component.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
<igx-input-group>
1010
<input igxInput #productName type="text" placeholder="Filter by product name" (input)="filter(productName.value)">
1111
</igx-input-group><br>
12-
<igx-input-group>
13-
<input igxInput #globalFilter type="text" placeholder="Filter global" (input)="filterGlobal(globalFilter.value)">
14-
</igx-input-group><br>
1512

1613
<div class="sample-wrapper">
1714
<div class="grid-wrapper">

src/app/grid-events/grid-events.component.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import {
1919
IgxColumnComponent,
2020
IgxPaginatorComponent,
2121
IgxButtonDirective,
22-
IgxIconComponent,
23-
FilteringLogic
22+
IgxIconComponent
2423
} from 'igniteui-angular';
2524
import { data } from '../shared/data';
2625

@@ -54,15 +53,6 @@ export class GridEventsComponent {
5453
this.grid.filter('ProductName', term, IgxStringFilteringOperand.instance().condition('contains'));
5554
}
5655

57-
public filterGlobal(term) {
58-
if (term) {
59-
this.grid.filteringLogic = FilteringLogic.Or;
60-
this.grid.filterGlobal(term, IgxStringFilteringOperand.instance().condition('contains'));
61-
} else {
62-
this.grid.clearFilter();
63-
}
64-
}
65-
6656
public columnMovingStart(event: IColumnMovingStartEventArgs) {
6757
console.log('event' + event);
6858
this.logAnEvent('=> columnMovingStart');

0 commit comments

Comments
 (0)