How to disable font scaling (dynamic types - accessibility) for text inputs in react native?
I have disabled dynamic types for text in the app by adding this code, but I still see that font in TextInputs are scaling:
Text.defaultProps = Text.defaultProps || {}; //Disable dynamic type in IOS
Text.defaultProps.allowFontScaling = false;
Okay, I found the solution, it can be done the same way as it was done with Text:
TextInput.defaultProps = Text.defaultProps || {}; //Disable dynamic type in IOS
TextInput.defaultProps.allowFontScaling = false;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With