Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input phone / react: when no defaultValue: Cannot read properties of undefined (reading 'split') #2274

Open
MarekLacoAXA opened this issue Apr 26, 2022 · 2 comments
Labels

Comments

@MarekLacoAXA
Copy link
Contributor

MarekLacoAXA commented Apr 26, 2022

ONLY if defaultValue IS NOT specified, then Errors on JS console appear when typing into text field, in case dropdown was not touched before.

version: 1.0.0

          <AXAInputPhoneReact/>
index.react.js?e32a:582 Uncaught TypeError: Cannot read properties of undefined (reading 'split')
    at AXAInputPhone.validatePhoneNumber (index.react.js?e32a:582:1)
    at AXAInputPhone.change (index.react.js?e32a:603:1)
    at AXAInputText.eval [as handleInput] (index.react.js?7548:800:1)
    at EventPart.handleEvent (parts.js?5c8e:462:1)
    at HTMLInputElement.EventPart.__boundHandleEvent (parts.js?5c8e:428:1)

image

@MarekLacoAXA MarekLacoAXA changed the title input phone / react: TypeError: Cannot read properties of undefined (reading 'split') input phone / react: when no defaultValue: Cannot read properties of undefined (reading 'split') Apr 26, 2022
@markus-walther markus-walther added Accepted A feature request or issue is accepted and will be implemented and removed Accepted A feature request or issue is accepted and will be implemented labels May 16, 2022
@markus-walther
Copy link
Contributor

Cannot reproduce.

https://codesandbox.io/s/elastic-poincare-7utxq8?file=/src/App.js works correctly in my reproduction attempts.

Screen Shot 2022-05-30 at 18 43 53

@MarekLacoAXA If you want to show the bug exists, please modify the above codesandbox instance to show your alleged bug in isolation.

@MarekLacoAXA
Copy link
Contributor Author

Hi @markus-walther !

Thanks for creating code sandbox!

This problem only appears when importing datepicker prior to input-phone 👀

Reproduced here:
https://codesandbox.io/s/recursing-elgamal-z92ot6?file=/src/App.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants