Skip to content
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

Issue replacing Text's fontFamily while state changes.. #22644

Closed
premrajt opened this issue Dec 13, 2018 · 3 comments
Closed

Issue replacing Text's fontFamily while state changes.. #22644

premrajt opened this issue Dec 13, 2018 · 3 comments
Labels
Bug Component: Text Resolution: Locked This issue was locked by the bot.

Comments

@premrajt
Copy link

premrajt commented Dec 13, 2018

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 126.22 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 27.0.3, 28.0.0, 28.0.2, 28.0.3
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: 0.57.8 => 0.57.8
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

Hi..

I am reporting an issue concerning TextInput in Android where fontFamily not changing on state changes..

Scenario :

  • on Initial component load i am using normal fontFamily (using state) to display place holder. (Working Fine)
  • When enter value in textField then fontFamily state should change & display Bold text. (Working Fine)
  • Again if I remove values from the textfield & if the text field value is empty then the state should update to normal fontFamily (Not Working - i can see state is updated but view is not changing)
  • Again enter value in the textfield It should show bold fontFamily but it showing the unknown fontFamily

When inspecting the changes State and Style are changing perfectly.. Not sure the problem in the view

Initial Load :
screen shot 2018-12-14 at 11 31 20 am

if value is not empty:
screen shot 2018-12-14 at 11 31 31 am

After Clearing the input Field:
screenshot_20181214-115212

Note : However in IOS all these things working fine.

Font Family used:  "Montserrat-ExtraBold",  "Montserrat-Medium";

Reproducible Demo

https://snack.expo.io/@premdev077/aW5wdX
https://snack.expo.io/HkCg9wexE (Font is not loaded)
@roadev
Copy link

roadev commented Dec 17, 2018

I can't reproduce your issue, I got this:

screenshot_2018-12-17-14-48-55

@premrajt
Copy link
Author

premrajt commented Dec 17, 2018

I can't reproduce your issue, I got this:

check this one : https://snack.expo.io/@premdev077/aW5wdX

@dulmandakh
Copy link
Contributor

please use underscores in font file names, and it should work.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: Text Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants