forge42dev / react-input-mask Goto Github PK
View Code? Open in Web Editor NEWInput masking for React
License: MIT License
Input masking for React
License: MIT License
Does this library support optional characters? For instance a US zip code is usually in format 99999
but sometimes can be in format 99999-9999
.
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of InputElement2 which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
Description:
Steps to Reproduce:
const { getInputProps } = useInputMask({
mask: 'One does not simply walk into AAAAAA',
});
return (
<div>
<h1>Overview</h1>
<div className="w-[240px] mt-12">
<Label>Label</Label>
<Input name="number" {...getInputProps} onChange={e => {
// Your onChange handler gets the output of the hook (won't trigger if the input is invalid)
console.log(e.target.value);
}} />
</div>
</div>
);
Expected Behavior:
Actual Behavior:
Error message: No error message.
Note: Update documentation. Import only functions if :
import { useInputMask } from '@code-forge/react-input-mask';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.