Questions tagged [react-native-text]

39 questions
2
votes
2 answers

React Native Text.defaultProps does not exist and creating it doesn't work either

I'm new to React Native (0.59.3) and I'm trying to set default font for all Text components in my app. I've read https://stackoverflow.com/a/47925418/811405 and How to disable font scaling in React Native for IOS app?. In my App.js I've put: import…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
2
votes
0 answers

Handle Context Menu on selectable Text in react-native

I am trying to modify context menu that shows up in selectable of in react-native. I want to do that specifically in js. It should select multiple words so that I can make api query using those words. There are other solutions using java -…
abby37
  • 597
  • 6
  • 21
2
votes
1 answer

React Native Text component not render anything if text string is large

React Native Text component not render anything if text string is large. Anyone has seen the same issue or has any solution? If I continue increase the string text size, at some point, the {someString} will not render anything. Here is small demo…
Pei
  • 83
  • 5
1
vote
0 answers

Font-weight not working as expected in react native

I am trying to set font weight '500' to text in react native but it is not working. Only fontWeight bold and normal are working. { fontWeight: '500' } Any solution for this ? Any help would be appreciated Thank you.
Bhaskar Joshi
  • 413
  • 7
  • 18
1
vote
0 answers

react-native TextInput component not showing the http url value properly in the iPhone SE model

In iPhone SE model, react-native TextInput component not display the http url properly. If I entered the value as https://www.test.com means it display the value only as https:// Issue Screenshot But If I entered as https://www.test.com/abc it…
1
vote
0 answers

Text Align justify is not working properly with Arabic characters in iOS

I wanted to render some Arabic content. When the text is justified ( textAlign:'justify' ), the Arabic text is getting hidden both in android and ios. In iOS, the symbols are wrongly aligned when justified using textAlign:'justify' (Check the below…
1
vote
0 answers

Text input keyboard type with options for 'bold', 'italic', 'underline' text - ipad

Is there any way to show the Bold/Italic/Underline buttons in the keyboard when focusing a TextInput on an iPad? I've seen this option already built in in the mail and notes apps, however I cannot find any way to do this for my app using React…
1
vote
4 answers

How to design a text with decoration line in react-native Text

I need to add some space between the text and decoration line. Any one have anu suggestion on this? I have set text-decoration line but it not shows space in between the text and decoration line. like below image Also, I have set boderBottom width.…
sejn
  • 2,040
  • 6
  • 28
  • 82
1
vote
2 answers

Focus on TextInput from imported Component

I have a TextInput in my Component (FirstComponent). I can call the focus on it from the component by calling the this.refs. I am also importing and calling another Component (SecondComponent) which also needs to focus on the TextInput on a button…
Somename
  • 3,376
  • 16
  • 42
  • 84
1
vote
2 answers

React Native - less sign in text

When i want to display the "less-than" sign (<) in Text component it throws this SyntaxError: Unexpected token (126:39) My code is: < 30 seconds How can i display "less-than" in React Native?
Ivan Chernykh
  • 41,617
  • 13
  • 134
  • 146
1
vote
1 answer

react-native: Custom Component pass component as property

I'm trying to extend the react-native TextInput (RCTTextField/RCTTextFieldManager) that I'm able to pass a react component (e.g. ...) as an attribute (e.g. input) that will be set as the UITextInputs inputView attribute. I'd expect…
Sven Tschui
  • 1,377
  • 8
  • 20
1
vote
1 answer

Whats the best way to I18n in a partial react native app?

I want to integrate a small react native view in an existing app completely written in Obj C. The most popular library available assumes that all strings are loaded in memory on the JS side. I am concerned that this might end up causing the app to…
Trunal Bhanse
  • 1,651
  • 1
  • 17
  • 27
0
votes
1 answer

How does react-native-measure-text calculate height

I want to measure the height of a text component in react-native without laying it out on screen. react-native-measure-text can be used for this, but how does this library calculates it.
Marcos
  • 37
  • 7
0
votes
1 answer

How can I change the font size of the default font in React Native?

The font I use does not support every alphabet. For example, if the user uses Chinese letters, the default font is used instead of my font in the application. In this case, there is a problem. The appropriate fontSize value for my font is 24.…
0
votes
1 answer

Objects are not valid as a React child in React Native

By rendering the FlatList I always get the error "Objects are not valid as a React child (found: object with keys {dispatchConfig, _targetInst, _dispatchListeners, _dispatchInstances, nativeEvent, type, target, currentTarget, eventPhase, bubbles,…