-
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 dynamic color #20131
Comments
Have you tried to use Stylesheet.flatten(...) in order to find some workaround?
https://facebook.github.io/react-native/docs/stylesheet.html |
Same issue here. Properties and style attributes of the TextInput component taken from react developer tools when text color is rendering in red:
The screenshot of expo app on iOS simulator with inspector shows the TextInput component with the corresponding style attributes - red vs. white, style attributes vs. rendering. Edit The dynamically set of attributes is running only one time. |
I am also encountering this issue. The text input cannot have it's style changed mid typing. I tried to apply 'key' to |
Can anyone create a repro that shows the issue on latest (0.58.4)? |
It also does not change on 0.58.4 |
@eXist-FraGGer perfect, can you create a repro for it? |
@kelset Hm, not today, maybe at the end of next weekend. |
Unable to repro: https://snack.expo.io/@jkcooper/rn20131---textinput-dynamic-color |
Repro:
|
@chrismcleod Can you repro in a non-hooks version? v0.59 is not officially released yet |
@CatapultJesse I tried the idiomatic equivalent using classes and it worked, so I was not able to reproduce using classes. |
Perhaps this can be revisited now that 0.59.0 is out? I'm still having this issue / am able to reproduce with @chrismcleod's code. |
any update on this issue? |
I just faced this issue. |
Just ran into this too using hooks --EDIT-- --EDIT 2-- |
(Issue label "needs repro" can probably be removed or replaced by "backlog" ^^) |
Is there any workarounds? I need to change color of the password field, in case of an error. Any other way to do it? |
Can anyone post a repro (not a Snack for now, it's still using Expo 32 = RN 57) using the first 0.60 RC? |
I've created a very simple repro, basically conditionalStyle seems to be always returning false value? |
This looks like it's only true for uncontrolled TextInput components I was looking at the example provided by @CatapultJesse and i removed the value field from the text component and was able to repro. Also on my own app, adding even just "value = 'test'" as a prop on my textInput solved the problem. as well as a controlled value from state |
It worked for me if I changed the text by adding a space after the actual text:
|
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. |
Still not fixed afaik |
I know it's a longshot, but has anyone tested this with the 0.62 RC0? |
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. |
Hello there 👋 this issue seems to have been inactive for a long time. Because of this, it's likely that the issue is not a high priority anymore or it has been solved by OP; for these reasons, we'll close it. But please, if it's actually still an issue with 0.62 please open a new issue that follows the template and provides a repro 😊 |
Environment
React Native Environment Info:
System:
OS: macOS Sierra 10.12.6
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 208.05 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.6.0 - /usr/local/bin/node
Yarn: 1.3.2 - /usr/local/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
react: ^16.4.1 => 16.4.1
react-native: ^0.56.0 => 0.56.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
I have TextInput with dynamic changing color based on state.
so when state changed textinput color not changing
this worked before i upgraded from 0.49.5 to 0.56.0
If i manually change color on text input all is ok, so issue in dynamic color changing.
The text was updated successfully, but these errors were encountered: