From 7ff3b68e52a4f21f70920de8e5b9b3a55bb9a9c5 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 21 Jan 2021 16:18:47 +0300 Subject: [PATCH] Fixed #9797 - Improve float label support in overlay selects --- src/app/components/autocomplete/autocomplete.ts | 2 +- src/app/components/cascadeselect/cascadeselect.ts | 2 +- src/app/components/dropdown/dropdown.ts | 2 +- src/app/components/multiselect/multiselect.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/autocomplete/autocomplete.ts b/src/app/components/autocomplete/autocomplete.ts index 2ed7169fd9e..38ffa9b98b4 100755 --- a/src/app/components/autocomplete/autocomplete.ts +++ b/src/app/components/autocomplete/autocomplete.ts @@ -77,7 +77,7 @@ export const AUTOCOMPLETE_VALUE_ACCESSOR: any = { ], host: { '[class.p-inputwrapper-filled]': 'filled', - '[class.p-inputwrapper-focus]': 'focus && !disabled' + '[class.p-inputwrapper-focus]': '(focus && !disabled) || overlayVisible' }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/components/cascadeselect/cascadeselect.ts b/src/app/components/cascadeselect/cascadeselect.ts index bbc48fd7dd4..b54e877aaf2 100755 --- a/src/app/components/cascadeselect/cascadeselect.ts +++ b/src/app/components/cascadeselect/cascadeselect.ts @@ -266,7 +266,7 @@ export class CascadeSelectSub implements OnInit { ], host: { '[class.p-inputwrapper-filled]': 'filled', - '[class.p-inputwrapper-focus]': 'focused' + '[class.p-inputwrapper-focus]': 'focused || overlayVisible' }, providers: [CASCADESELECT_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/components/dropdown/dropdown.ts b/src/app/components/dropdown/dropdown.ts index 994700cc079..2793a204b88 100755 --- a/src/app/components/dropdown/dropdown.ts +++ b/src/app/components/dropdown/dropdown.ts @@ -136,7 +136,7 @@ export class DropdownItem { ], host: { '[class.p-inputwrapper-filled]': 'filled', - '[class.p-inputwrapper-focus]': 'focused' + '[class.p-inputwrapper-focus]': 'focused || overlayVisible' }, providers: [DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index 02b6adb54a0..55c27ac2bab 100755 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -172,7 +172,7 @@ export class MultiSelectItem { ], host: { '[class.p-inputwrapper-filled]': 'filled', - '[class.p-inputwrapper-focus]': 'focus' + '[class.p-inputwrapper-focus]': 'focus || overlayVisible' }, providers: [MULTISELECT_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush,