Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accessibilityLabelledBy use DynamicFromObject to parse String to Dyna…
…mic (#34371) Summary: `accessibilityLabelledBy` accepts String or Array type. - The JavaScript Array type corresponds to java [ReadableArray][3] ([HybridData][4]) - The JavaScript String type corresponds to the java String Use [DynamicFromObject][5] to parse String to Dynamic. https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java#L222-L228 All credits to [grgr-dkrk][1] (PR #32470). fixes [https://github.com/facebook/react-native/issues/30846][2] ## Changelog [Android] [Fixed] - accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic Pull Request resolved: #34371 Test Plan: <details><summary>testing accessibilityLabelledBy with TextInput</summary> <p> https://user-images.githubusercontent.com/24992535/183593138-7ced1974-6a06-4f0f-822a-1ade1edc7212.mp4 </p> </details> <details><summary>testing accessibilityLabelledBy with Switch</summary> <p> ![Screen Shot 2022-08-09 at 15 53 37](https://user-images.githubusercontent.com/24992535/183596336-4b73186b-6d27-485e-a6ea-29a0f0b9ef50.png) </p> </details> <details><summary>testing paper renderer after the fix</summary> <p> https://user-images.githubusercontent.com/24992535/183605619-01f1be64-788a-43bd-88b0-a7b2cad75148.mp4 </p> </details> [1]: https://github.com/grgr-dkrk [2]: #30846 [3]: https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java#L1 [4]: https://github.com/facebookincubator/fbjni/blob/main/java/com/facebook/jni/HybridData.java [5]: https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromObject.java#L74 Reviewed By: lunaleaps Differential Revision: D38706360 Pulled By: huntie fbshipit-source-id: e4771552d3fddfad50f4d4cbbf971fe4a718e134
- Loading branch information