-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I want to format a number with thousands separators like this:
| Input | Output |
|---|---|
| 1 | 1 |
| 12 | 12 |
| 123 | 123 |
| 1234 | 1,234 |
| 12345 | 12,345 |
| 123456 | 123,456 |
This same feature was requested here in the iOS library that this package uses and is implemented here
Describe the solution you'd like
Ideally the affinityFormat prop would behave in a way that would allow using the existing api to accomplish this, but given the native library creates a separate subclass NumberInputListener, it might be easiest to export a separate component for this specific use case.
Describe alternatives you've considered
I thought the following would work, but it doesn't
const Input = () => {
return (
<MaskedTextInput
autocomplete={false}
mask="[999],[999]"
affinityFormat={['[9]', '[99]', '[999]', '[9],[999]', '[99],[999]', '[999],[999]']}
/>
);
};peterjskaltsis, kirillzyusko, jordankkk, dhatGuy, makustova and 1 morefinnmerlett, danieloprado and makustova
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request