react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Breaking changes on TextInput ref between 4.12 and 4.11.x

Open lucaswitch opened this issue 2 years ago • 9 comments

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.

lucaswitch avatar Apr 08 '22 21:04 lucaswitch

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.

github-actions[bot] avatar Apr 08 '22 21:04 github-actions[bot]

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.

github-actions[bot] avatar Apr 08 '22 21:04 github-actions[bot]

Here's a gist I've been using to share an internal ref while also using it internally: https://gist.github.com/pie6k/b4717f392d773a71f67e110b42927fea

seahorsepip avatar Apr 08 '22 22:04 seahorsepip

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?

lukewalczak avatar Apr 10 '22 18:04 lukewalczak

Ok, i will do.

lucaswitch avatar Apr 11 '22 17:04 lucaswitch

@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.

lucaswitch avatar Apr 14 '22 13:04 lucaswitch

Hello, any news?

lucaswitch avatar Apr 20 '22 17:04 lucaswitch

Guyz fix this issue .

goxr3plus avatar Jun 13 '22 13:06 goxr3plus

It's causing this problem https://github.com/callstack/react-native-paper/issues/3141#issuecomment-1147695589

goxr3plus avatar Jun 13 '22 13:06 goxr3plus