From 64ed9ddc59e5a5caabebcbcdf7ef36c3bda85ee8 Mon Sep 17 00:00:00 2001 From: Will McAllister <53065222+willmca@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:32:16 -0400 Subject: [PATCH 1/2] Update dropdown.ts address issue by adding p-dropdown-open class when overlayVisible is true --- src/app/components/dropdown/dropdown.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/components/dropdown/dropdown.ts b/src/app/components/dropdown/dropdown.ts index cdc9379fcdf..904f34a9ef5 100755 --- a/src/app/components/dropdown/dropdown.ts +++ b/src/app/components/dropdown/dropdown.ts @@ -932,7 +932,8 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV 'p-focus': this.focused, 'p-inputwrapper-filled': this.modelValue() !== undefined && this.modelValue() !== null && !this.modelValue().length, 'p-inputwrapper-focus': this.focused || this.overlayVisible, - 'p-variant-filled': this.variant === 'filled' || this.config.inputStyle() === 'filled' + 'p-variant-filled': this.variant === 'filled' || this.config.inputStyle() === 'filled', + 'p-dropdown-open': this.overlayVisible }; } From 62e1b3bf9c4d0a29325c64317724ef32945c5a79 Mon Sep 17 00:00:00 2001 From: Will McAllister <53065222+willmca@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:32:26 -0400 Subject: [PATCH 2/2] Update dropdown.spec.ts add a check for class name to unit test --- src/app/components/dropdown/dropdown.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/dropdown/dropdown.spec.ts b/src/app/components/dropdown/dropdown.spec.ts index 98f37ba2529..127a29c0b44 100755 --- a/src/app/components/dropdown/dropdown.spec.ts +++ b/src/app/components/dropdown/dropdown.spec.ts @@ -160,6 +160,7 @@ describe('Dropdown', () => { const dropdownPanel = fixture.debugElement.query(By.css('.p-dropdown-panel')); expect(dropdownPanel).toBeTruthy(); + expect(container.className).toContain('p-dropdown-open'); expect(dropdown.overlayVisible).toBeTrue(); });