From 9817cf61d441988d6b67f72ea8d851a7461a8a03 Mon Sep 17 00:00:00 2001 From: Diego Cardoso Date: Thu, 25 Jun 2020 11:59:28 +0300 Subject: [PATCH] fix: workaround Polymer getProperty with mixins/observers (#484) (#488) See https://github.com/Polymer/polymer/issues/5259 Co-authored-by: Tomi Virkki --- src/vaadin-text-field-mixin.html | 9 +++++++++ test/integer-field.html | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/vaadin-text-field-mixin.html b/src/vaadin-text-field-mixin.html index 5a656ad2..d971ff0b 100644 --- a/src/vaadin-text-field-mixin.html +++ b/src/vaadin-text-field-mixin.html @@ -876,6 +876,15 @@ } } + // Workaround for https://github.com/Polymer/polymer/issues/5259 + get __data() { + return this.__dataValue || {}; + } + + set __data(value) { + this.__dataValue = value; + } + /** * Fired when the user commits a value change. * diff --git a/test/integer-field.html b/test/integer-field.html index d4c4d564..c2e9fedb 100644 --- a/test/integer-field.html +++ b/test/integer-field.html @@ -19,6 +19,14 @@ + + + +