react-native-paper
react-native-paper copied to clipboard
Breaking changes on TextInput ref between 4.12 and 4.11.x
Current behaviour 4.12
When setting a ref inside a <TextInput/> element exposes in ref the following: focus: () clear: () setNativeProps: (args: Object) isFocused: () blur: () forceFocus: ()
Expected behaviour 4.11
In older versions than 4.11.x it was possible to access <TextInput/> private component methods like, setFocused() and others, allowing devs to change the behavior of TextInput more than the exposed in 4.12.0.
Couldn't find version numbers for the following packages in the issue:
-
react-native
-
react-native-paper
-
react-native-vector-icons
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).
Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.
Here's a gist I've been using to share an internal ref while also using it internally: https://gist.github.com/pie6k/b4717f392d773a71f67e110b42927fea
Hey @lucaswitch could you please present on the snack (since it's the easiest way to present the problem using different library versions) the difference in TextInput
between the latest version and the previous one?
Ok, i will do.
@lukewalczak here is the snacks you asked for:
Paper 4.11.x: https://snack.expo.dev/@lucaswitch/reactnativepaper4-11 Paper 4.12.x: https://snack.expo.dev/@lucaswitch/reactnativepaper4-12 Please open snack console to see the ref attributes for each one of the versions.
Hello, any news?
Guyz fix this issue .
It's causing this problem https://github.com/callstack/react-native-paper/issues/3141#issuecomment-1147695589