himelbrand / react-native-numeric-input

a stylish numeric input for react native
MIT License
150 stars 98 forks source link

[BUG] - IOS Keyboard force comma #91

Open mistre85 opened 1 year ago

mistre85 commented 1 year ago

Describe the bug In the IOS version the keyboard has a forcing of the "comma" character, but the component uses only the version with the "dot" character. I used a fix with ref, would it be possible to have a native props to fix this iussue?

this is the fix i made

function onChange(value) { this.value = value.replace(",","."); }

useEffect(()=>{
    if(inputRef!=null && inputRef.current != null){
        inputRef.current.onChange = onChange;
    }
},[inputRef])