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

Cursor index when adding multiple characters in format #80

Open
NouraldinS opened this issue Jul 7, 2019 · 1 comment
Open

Cursor index when adding multiple characters in format #80

NouraldinS opened this issue Jul 7, 2019 · 1 comment

Comments

@NouraldinS
Copy link

This library is awesome and all, done pretty much most of the heavy lifting I wasted work hours on. But it has a small problem

Problem statement

When reformatting the value, if I add characters to the new value as in:

...
format={v => v + 'abcd'};
...

The cursor would stand where I would normally be without the newly added characters, not at the end of the new string.

Problem reproduced

https://codesandbox.io/s/istarkovrifm-cursor-index-bug-p9mjr

Versions

node: v11.14.0
npm: 6.9.2
rifm: ^0.9.1

@antiold
Copy link

antiold commented Oct 23, 2019

I believe the new append prop solves this :-)

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

No branches or pull requests

2 participants