Hi,
Very usefull component, great job!
But I can’t get to work PhonePLFieldFormatter (Vaadin 14). When I use it:
new PhonePLFieldFormatter().extend(phoneField);
I get a JS error:
Error: [cleave.js] Please include phone-type-formatter.{country}.js lib
I can see than in node_modules there is cleave.js\dist\addons\cleave-phone.pl.js
I’ve even delete node_modules, package.json, package-lock.json and even webpack.xx.js, update maven project, run it. App start ok, but when field is rendered the upper error is shown.
4.0.1 might fix your problems. With the beta version I tried to do naive code splitting with the separate classes for phone number locales. I now realized that it doesn’t work like that with Vaadin. Now there is only one PhoneI18nFieldFormatter class which you pass the region code as an argument.
Hello, im still having the “Error: [cleave.js]
Please include phone-type-formatter.{country}.js lib” popping up, i have updated to version 4.0.1 but the problem persists. Also, im getting two other errors besides the Please include error:
“TypeError: this.removeValueChangedFromParentElement is not a function”
“TypeError: pps.phoneFormatter.format is not a function”
code example:
TextField telephoneTF = new TextField();
new PhoneI18nFieldFormatter(PhoneI18nFieldFormatter.REGION_BR).extend(telephoneTF);
telephoneTF.setWidth("50%");
return telephoneTF;
Strangely, if i try to wrap a different formatter, for example the Credit Card Formatter, it works flawlessly, but the phone formatter won’t work