Code Monkey home page Code Monkey logo

input-format's Issues

Android keyboards caret jumping

Caret doesn't jump over programmatically inserted symbols (like spaces, parentheses, etc) when using default Samsung and Sony keyboards.

Examples

Input sequence: 987654321
| means caret position.

Samsung keyboard

(|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 ๐Ÿ‘Ž

Google keyboard

(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).

Doesn't apply style object

I just tried this library with style props
But apparently it doesn't matter what props you pass, it just consider its default value

Question: forcing phone code

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.

`format` doesn't accept prop updates in certain cases

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.