catamphetamine / input-format Goto Github PK
View Code? Open in Web Editor NEWFormatting user's text input on-the-fly
Home Page: https://catamphetamine.github.io/input-format/
License: MIT License
Formatting user's text input on-the-fly
Home Page: https://catamphetamine.github.io/input-format/
License: MIT License
I just tried this library with style props
But apparently it doesn't matter what props you pass, it just consider its default value
Thanks for your work, @halt-hammerzeit
What's the best way to force a phone code inside of input-format? For example, +7
.
templateFormatter
with +7 (xxx) xxx xx xx
appends 7
on every key press.
I guess that it should skip +
as a first symbol and 7
as a second symbol. But it should append +7
if 1-6
of 8-0
are entered.
It would be great if you could support phone numbers without 0 at the beginning.
For example
09181233445
= 9181233445
, it should be like this 0918 123 3445
Whilst
09181233445
= 0918 123 3445
It looks like the format
prop doesn't actually update if given a template that is larger than the original
E.g. in this CodeSandbox: https://codesandbox.io/s/pwwnpxljrj - checking the tickbox results in the input still being bound to only 1 digit long. However, if you set the oneLong
state to false
originally, then there is no issue (presumably since the original template is longer than any subsequent template)
Caret doesn't jump over programmatically inserted symbols (like spaces, parentheses, etc) when using default Samsung and Sony keyboards.
Input sequence: 987654321
|
means caret position.
(|9 )
(8|9 )
(87|9)
(876|) 9
(876)| 59
(876) |459
(876) 3|45-9
(876) 32|4-59
(876) 321|-459
Expected 987654321
Actual 876321459
๐
(9| )
(98| )
(987|)
(987) 6|
(987) 65|
(987) 654|
(987) 654-3|
(987) 654-32|
(987) 654-321|
Expected 987654321
Actual 987654321
๐
Although the input mask works as expected when using Google keyboard (GBoard).
How would integrate this library in Angular2/4 project.
Could you please provide steps for the same.
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.