From a5541152c69b0a283cfe605b530de6b3a1d88b4f Mon Sep 17 00:00:00 2001 From: Bernie Sumption Date: Mon, 24 Aug 2026 17:03:56 +0200 Subject: [PATCH] AG-18149 Remove 1px minimum height for empty row container (#14941) --- .gitignore | 1 + .../ag-grid-angular/src/lib/tests/quick-filter.spec.ts | 8 ++++---- .../ag-grid-community/src/rendering/rowRenderer.ts | 10 +--------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index d0c25b134d1..e54c8c1ae97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea .vscode .junie +.playwright-mcp vite.config.ts.timestamp-*.mjs vite.config.mts.timestamp-*.mjs diff --git a/packages/ag-grid-angular/projects/ag-grid-angular/src/lib/tests/quick-filter.spec.ts b/packages/ag-grid-angular/projects/ag-grid-angular/src/lib/tests/quick-filter.spec.ts index cd4033d2b09..8f647987402 100644 --- a/packages/ag-grid-angular/projects/ag-grid-angular/src/lib/tests/quick-filter.spec.ts +++ b/packages/ag-grid-angular/projects/ag-grid-angular/src/lib/tests/quick-filter.spec.ts @@ -88,7 +88,7 @@ describe('Quick Filter', () => { validateState({ gridRows: 17, displayedRows: 0, templateRows: 0 }); // To have all the async functions run we flush our fakeAsync test environment. This empties the call stack - flush(25); + flush(40); // So now our component has its displayedRows property updated as the grid callback has been run // However, this has not been reflected in our template yet as change detection has not run. validateState({ gridRows: 17, displayedRows: 17, templateRows: 0 }); @@ -114,7 +114,7 @@ describe('Quick Filter', () => { validateState({ gridRows: 10, displayedRows: 17, templateRows: 17 }); // We now flush out all the async callbacks - flush(25); + flush(40); // Our component event handler has now been run and updated its displayedRows value validateState({ gridRows: 10, displayedRows: 10, templateRows: 17 }); @@ -127,7 +127,7 @@ describe('Quick Filter', () => { it('should filter rows by quickFilterText', fakeAsync(() => { fixture.detectChanges(); - flush(25); + flush(40); fixture.detectChanges(); validateState({ gridRows: 17, displayedRows: 17, templateRows: 17 }); @@ -136,7 +136,7 @@ describe('Quick Filter', () => { quickFilterDE.nativeElement.dispatchEvent(new Event('input')); fixture.detectChanges(); - flush(25); + flush(40); fixture.detectChanges(); validateState({ gridRows: 10, displayedRows: 10, templateRows: 10 }); diff --git a/packages/ag-grid-community/src/rendering/rowRenderer.ts b/packages/ag-grid-community/src/rendering/rowRenderer.ts index d11ac872591..24c2e802bc1 100644 --- a/packages/ag-grid-community/src/rendering/rowRenderer.ts +++ b/packages/ag-grid-community/src/rendering/rowRenderer.ts @@ -734,15 +734,7 @@ export class RowRenderer extends BeanStub implements NamedBean { return; } - let containerHeight = this.pageBounds.getCurrentPageHeight(); - // we need at least 1 pixel for the horizontal scroll to work. so if there are now rows, - // we still want the scroll to be present, otherwise there would be no way to scroll the header - // which might be needed us user wants to access columns - // on the RHS - and if that was where the filter was that cause no rows to be presented, there - // is no way to remove the filter. - if (containerHeight === 0) { - containerHeight = 1; - } + const containerHeight = this.pageBounds.getCurrentPageHeight(); rowContainerHeight.setModelHeight(containerHeight + additionalHeight); }