@@ -2047,6 +2047,40 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
20472047 expect ( chipDiv . classList . contains ( 'igx-chip__item--selected' ) ) . toBe ( false , 'chip is not committed' ) ;
20482048 expect ( input . value ) . toBe ( '' , 'input value is present and not committed' ) ;
20492049 } ) ) ;
2050+
2051+ it ( 'should not retain expression values in cell filter after calling grid clearFilter() method.' , fakeAsync ( ( ) => {
2052+ // Click on 'ProductName' filter chip
2053+ GridFunctions . clickFilterCellChipUI ( fix , 'ProductName' ) ;
2054+ fix . detectChanges ( ) ;
2055+
2056+ // Enter expression
2057+ GridFunctions . typeValueInFilterRowInput ( 'NetAdvantage' , fix ) ;
2058+ tick ( DEBOUNCETIME ) ;
2059+ GridFunctions . closeFilterRow ( fix ) ;
2060+ fix . detectChanges ( ) ;
2061+
2062+ // Verify filtered data
2063+ expect ( grid . filteredData . length ) . toEqual ( 1 ) ;
2064+
2065+ // Clear filters of all columns
2066+ grid . clearFilter ( ) ;
2067+ fix . detectChanges ( ) ;
2068+
2069+ // Verify filtered data
2070+ expect ( grid . filteredData ) . toBeNull ( ) ;
2071+
2072+ // Click on 'ProductName' filter chip
2073+ GridFunctions . clickFilterCellChipUI ( fix , 'ProductName' ) ;
2074+ fix . detectChanges ( ) ;
2075+
2076+ // Verify there are no chips since we cleared all filters
2077+ const filteringRow = fix . debugElement . query ( By . directive ( IgxGridFilteringRowComponent ) ) ;
2078+ const conditionChips = filteringRow . queryAll ( By . directive ( IgxChipComponent ) ) ;
2079+ expect ( conditionChips . length ) . toBe ( 0 ) ;
2080+
2081+ // Verify filtered data
2082+ expect ( grid . filteredData ) . toBeNull ( ) ;
2083+ } ) ) ;
20502084 } ) ;
20512085
20522086 describe ( 'Integration scenarios' , ( ) => {
@@ -2352,8 +2386,6 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
23522386 expect ( colOperands [ 0 ] . nativeElement . innerText ) . toEqual ( 'AND' ) ;
23532387 expect ( colIndicator . length ) . toEqual ( 0 ) ;
23542388 } ) ) ;
2355-
2356-
23572389 } ) ;
23582390
23592391 describe ( null , ( ) => {
0 commit comments