-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TextInput] Nested Text Components not able to have different Colors [iOS] #29584
Comments
@sanborN93 I also encountered this issue and found that setting |
It resolves the issue! But that can't be the solution. There will be a case where someone doesnt want to use a multiline textinput but still want to have the feature.Implementation should be the same as on Android. |
there will be another issue if you set update: |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
This issue was closed because it has been stalled for 7 days with no activity. |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
My project is a social network and I am currently encountering the following problem: I have a TextInput which is meant for comments, when the user enters his text he can mark other people. These are marked by an @username and are blue in color.
Inside the TextInput I render a text component which is divided into smaller parts which are also all text components to show the different colors.
Unfortunately this only works on Android and not on iOS.
React Native version:
Binaries:
Node: 10.18.1 - /usr/local/opt/node@10/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/opt/node@10/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
Languages:
Java: 13.0.2 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
The nested Text inside the TextInput should be able to have different colors on iOS like on Android.
Snack, code example, screenshot, or link to a repository:
Code Example:
convertTextToColors(_text) {
//define delimiter
const delimiter = /\s+/;
<TextInput
The text was updated successfully, but these errors were encountered: