From 2d662d293e2fb6bcfcea001c0d22c7ab55165b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Merve=20=C3=96z=C3=A7if=C3=A7i?= Date: Thu, 23 May 2019 12:01:05 +0300 Subject: [PATCH] Fix for float label --- src/components/autocomplete/AutoComplete.vue | 2 +- src/components/calendar/Calendar.vue | 6 +++++- src/components/chips/Chips.vue | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/autocomplete/AutoComplete.vue b/src/components/autocomplete/AutoComplete.vue index ecddf8520..92695dbc5 100644 --- a/src/components/autocomplete/AutoComplete.vue +++ b/src/components/autocomplete/AutoComplete.vue @@ -357,7 +357,7 @@ export default { return ['p-autocomplete p-component', { 'p-autocomplete-dd': this.dropdown, 'p-autocomplete-multiple': this.multiple, - 'p-inputwrapper-filled': this.filled, + 'p-inputwrapper-filled': this.value, 'p-inputwrapper-focus': this.focused }]; }, diff --git a/src/components/calendar/Calendar.vue b/src/components/calendar/Calendar.vue index 55b2b3c9e..fbfa46a4b 100644 --- a/src/components/calendar/Calendar.vue +++ b/src/components/calendar/Calendar.vue @@ -327,6 +327,7 @@ export default { currentMinute: null, currentSecond: null, pm: null, + focused: false, overlayVisible: false } }, @@ -1468,9 +1469,11 @@ export default { if ($vm.showOnFocus && $vm.isEnabled()) { $vm.overlayVisible = true; } + $vm.focused = true; $vm.$emit('focus', event) }, blur: event => { + $vm.focused = false; $vm.$emit('blur', event); }, keydown: event => { @@ -1500,7 +1503,8 @@ export default { { 'p-calendar-w-btn': this.showIcon, 'p-calendar-timeonly': this.timeOnly, - 'p-inputwrapper-filled': this.value + 'p-inputwrapper-filled': this.value, + 'p-inputwrapper-focus': this.focused } ]; }, diff --git a/src/components/chips/Chips.vue b/src/components/chips/Chips.vue index be3f30566..8b45ba286 100644 --- a/src/components/chips/Chips.vue +++ b/src/components/chips/Chips.vue @@ -1,6 +1,6 @@