catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
925 stars 194 forks source link

(WebDriverIO) Can't clear the value #348

Open chrux opened 4 years ago

chrux commented 4 years ago

Hi,

We're using this component in a project and we're doing e2e testing but when we try to set the value to empty, we're not able to, we set the $('.tab-pane.active form input[name="phone"]').clearValue() but value is not empty. We also tried setting the value to an empty string ("") or undefined, nothing works, even the onChange method is not triggered.

Thanks for your help

chrux commented 4 years ago

By the way, setting the value the first time (when is empty) works ok, after that we cannot change the value correctly though.

catamphetamine commented 4 years ago

Hi.

This could potentially be related to input-format that's used by default. See if smartCaret={false} behaves differently.

I didn't test this library in someting like the scenario you're describing, so you could also provide a minimal demo reproducing the issue, though it's not guaranteed to be fixed afterwards.

chrux commented 4 years ago

Ok, I tested this, it didn't work but thanks for your help.