MaskedInput not registering input in React 16.4
See original GitHub issueEnvironment
Tech | Version |
---|---|
material-ui-pickers | 1.0.0-rc.10 |
material-ui | 1.2.1 |
React | 16.4.1 |
Browser | N/A |
Platform | N/A |
Steps to reproduce
- Create a DatePicker with mask with React 16.4.1
- Attempt to type in the box.
Expected behavior
When I type into input the value should register.
Actual behavior
Value is being cleared immediately thus appearing as if the input is readonly.
Live example
https://codesandbox.io/s/wnljy6rkok
Notes:
I reported a similar issue on the Formik library as well. Without digging into it much, my hunch is that it may be related to the changes to getDerivedStateFromProps
in React 16.4 where this now fires on every render.
Also note, this does work if you choose a date first from the picker. This also works using React 16.3.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
MaskedInput not registering input in React 16.4 #475 - GitHub
I'm currently facing a similar issue. I tried downloading the docs project (the website where the docs are stored), and if I try...
Read more >Not working onChange in react-input-mask (custom input)
I am not using any libraries as input, but for some reason onChange dont work... <InputMask onChange={(e) => console.log(e.target ...
Read more >React Hook Form with InputMask - CodeSandbox
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >[InputMask React] Input mask text not working when hebrew ...
Hello guys. I need some help because of the patterns a: alphabetical or *: alphanumeric in any of those cases I'm able to...
Read more >@types/react-input-mask - npm
Start using @types/react-input-mask in your project by running `npm i @types/react-input-mask`. There are 77 other projects in the npm ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, I guess @nzacca issue and (@waclock && me) issue are different. Ours is fixed with your PR, but the codesandbox example from @nzacca has a different behaivour than we experienced.
I’m currently facing a similar issue. I tried downloading the docs project (the website where the docs are stored), and if I try using the options mask + keyboard, when I click on the calendar option and then click “OK”, the input value won’t update, even though I can see the state of the component did change. I could not get the DatePicker with mask + keyboard to work, neither with React 16.4.1 nor 16.3.