From 60708f4a6c0524b7bcb541f8fc66c3101671eda3 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 25 Jul 2024 12:36:04 +0200 Subject: [PATCH] feat: improve qFormMixin in production environment --- src/boot/qformMixin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index 0bf1f9795..54edfb60b 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -4,9 +4,11 @@ const filterAvailableInput = (element) => { return element.classList.contains('q-field__native') && !element.disabled; }; const filterAvailableText = (element) => { + const parentComponent = element.__vueParentComponent; + if (!parentComponent) return element.attributes.component.nodeValue !== 'input'; return ( - element.__vueParentComponent.type.name === 'QInput' && - element.__vueParentComponent?.attrs?.class !== 'vn-input-date' + parentComponent?.type.name === 'QInput' && + parentComponent?.attrs?.class !== 'vn-input-date' ); };