I have a TextInput that should only accept numeric values. I can more or less force this by using keyboardType "number-pad" on iOS, but Android only has "numeric", which provides keys for characters like - or ,. Even then, an attached hardware keyboard (like the iOS Simulator / Android Emulator have by default) still allows entry of non-numeric characters.
Everything I can find online is filtering the entered value in onChangeText, storing the filtered value in the state and use the state as the TextInputs value – while this does work, it causes the entered value to briefly appear before the JavaScript is able to filter it. Since I can't force the Android keyboard to only show numbers, I really want to avoid this visual behavior.
Android has android:digits for this, but I don't think this is available in React Native.
Is there any way to filter the TextInputs value before it is displayed?