mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
32931466ed
Summary: Fixes https://github.com/facebook/react-native/issues/29244, also mentioned in https://github.com/facebook/react-native/issues/25009 As mentioned in the linked issues, the current return key label in the input accessory view is not localized. In the code, right now the texts are hardcoded (see: [RCTTextInputComponentView.mm](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm#L552) and [RCTBaseTextInputView.mm](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L694)). I could not find the historical reason for this, but doing some investigation there doesn't seem to be a way of getting the translated text into the code by using the existing props. (Ref: https://stackoverflow.com/a/58190342/5415299) The solution: adding a new property `inputAccessoryViewButtonLabel` which can be used to overwrite these defaults non-translated values. The property is optional to avoid breaking changes. The implementation works for both Fabric and Paper. ## Changelog: [IOS] [ADDED] - TextInput `inputAccessoryViewButtonLabel` prop Pull Request resolved: https://github.com/facebook/react-native/pull/47441 Test Plan: A new example has been added under the `TextInput` examples in the RNTester. See below: <details> <summary>Video demonstrating how the new prop behaves</summary> https://github.com/user-attachments/assets/b15cb8b8-494a-4f41-b434-e33eeef5d267 </details> Reviewed By: cipolleschi Differential Revision: D65533493 Pulled By: javache fbshipit-source-id: d80bf501ba3e38bf3b09833170780df45a26bb61 |
||
---|---|---|
.. | ||
assets | ||
babel-plugin-codegen | ||
community-cli-plugin | ||
core-cli-utils | ||
debugger-frontend | ||
dev-middleware | ||
eslint-config-react-native | ||
eslint-plugin-react-native | ||
eslint-plugin-specs | ||
gradle-plugin | ||
helloworld | ||
hermes-inspector-msggen | ||
metro-config | ||
normalize-color | ||
polyfills | ||
react-native | ||
react-native-babel-preset | ||
react-native-babel-transformer | ||
react-native-bots | ||
react-native-codegen | ||
react-native-codegen-typescript-test | ||
react-native-info | ||
react-native-popup-menu-android | ||
react-native-test-library | ||
react-native-test-renderer | ||
rn-tester | ||
typescript-config | ||
virtualized-lists |