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

Issues editing/deleting input when you leave and re-focus onto the CurrencyInput when using suffix #23

Open
mmfire118 opened this issue Mar 27, 2022 · 3 comments

Comments

@mmfire118
Copy link

When you enter text into the CurrencyInput, close the keyboard, and re-focus onto the input, the cursor moves to the end, behind the suffix.

As a result when you try to delete or edit the value, the cursor moves directly after the first character of the input.

This causes unexpected behavior which is annoying for the user.

IMG_0235.mp4

It would be great if the cursor moved directly before the suffix if the CurrencyInput was not empty when you re-focus onto it.

@mmfire118
Copy link
Author

mmfire118 commented Mar 27, 2022

import CurrencyInput from 'react-native-currency-input';

const [value, setValue] = React.useState(null)

<CurrencyInput
        value={value}
        onChangeValue={setValue}
        prefix=""
        delimiter=","
        separator="."
        precision={1}
        minValue={0}
        maxValue={99.9}
        suffix="%"
/>

@CaioQuirinoMedeiros
Copy link
Owner

I'll take a look into it!

@mmfire118
Copy link
Author

Any updates?

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