Skip to content

Commit 78b68f9

Browse files
authored
Merge branch '10.2.x' into alt-l-under-mac-10.2.x
2 parents 3db7d13 + ce557f2 commit 78b68f9

File tree

4 files changed

+44
-5
lines changed

4 files changed

+44
-5
lines changed

projects/igniteui-angular/src/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.ts

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

620620
private addItems(shouldUpdateSelection: boolean) {
621621
this.selectAllSelected = true;
622+
this.containsNullOrEmpty = false;
622623
this.selectAllIndeterminate = false;
623624

624625
this.uniqueValues.forEach(element => {

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
175175
private _cdrRequests = false;
176176
protected _cdrRequestRepaint = false;
177177

178-
/**
179-
* @hidden @internal
180-
*/
181-
public snackbarDisplayTime = 2000;
182-
183178
/**
184179
* @hidden @internal
185180
*/
@@ -250,6 +245,14 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
250245
return this._resourceStrings;
251246
}
252247

248+
/**
249+
* Gets/Sets the display time for the row adding snackbar notification.
250+
* @remarks
251+
* By default it is 6000ms.
252+
*/
253+
@Input()
254+
public snackbarDisplayTime = 6000;
255+
253256
/**
254257
* Gets/Sets whether to autogenerate the columns.
255258
* @remarks

projects/igniteui-angular/src/lib/grids/grid/grid-add-row.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,27 @@ describe('IgxGrid - Row Adding #grid', () => {
288288
const cell = newRow.cells.find(c => c.column === column);
289289
expect(typeof(cell.value)).toBe(type);
290290
});
291+
292+
it('should allow setting a different display time for snackbar', async() => {
293+
grid.snackbarDisplayTime = 50;
294+
fixture.detectChanges();
295+
296+
const row = grid.getRowByIndex(0);
297+
row.beginAddRow();
298+
fixture.detectChanges();
299+
300+
endTransition();
301+
302+
grid.endEdit(true);
303+
fixture.detectChanges();
304+
305+
expect(grid.addRowSnackbar.isVisible).toBe(true);
306+
// should hide after 50ms
307+
await wait(51);
308+
fixture.detectChanges();
309+
310+
expect(grid.addRowSnackbar.isVisible).toBe(false);
311+
});
291312
});
292313

293314
describe('Add row events tests:', () => {

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4860,6 +4860,20 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
48604860
inputNativeElement = GridFunctions.getExcelStyleSearchComponentInput(fix);
48614861
expect(inputNativeElement.value).toBe('', 'input value didn\'t reset');
48624862
}));
4863+
4864+
it('Should reset blank items on column change.', fakeAsync(() => {
4865+
GridFunctions.clickExcelFilterIconFromCode(fix, grid, 'ProductName');
4866+
flush();
4867+
4868+
let listItems = GridFunctions.getExcelStyleSearchComponentListItems(fix);
4869+
expect(listItems[1].innerText).toBe('(Blanks)');
4870+
4871+
GridFunctions.clickExcelFilterIconFromCode(fix, grid, 'AnotherField');
4872+
flush();
4873+
4874+
listItems = GridFunctions.getExcelStyleSearchComponentListItems(fix);
4875+
expect(listItems[1].innerText).not.toBe('(Blanks)');
4876+
}));
48634877
});
48644878

48654879
describe('Load values on demand', () => {

0 commit comments

Comments
 (0)