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

numberOfLines does not work! #15732

Closed
xclidongbo opened this issue Sep 1, 2017 · 1 comment
Closed

numberOfLines does not work! #15732

xclidongbo opened this issue Sep 1, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@xclidongbo
Copy link

xclidongbo commented Sep 1, 2017

Is this a bug report?

(write your answer here)
NO

Have you read the Contributing Guidelines?

(Write your answer here.)
Yes

Environment

  1. react-native -v:2.0.1
  2. node -v:v8.2.1
  3. npm -v:5.3.0
  4. yarn --version:0.27.5

react-native-cli: 2.0.1
react-native: 0.47.2
node v8.2.1
npm 5.3.0
Then, specify:

  • Target Platform:iOS
  • Development Operating System: macOS
  • Build tools:Xcode

Steps to Reproduce

(Write your steps here:)

      <View style={{flex: 1, alignItems: 'center', backgroundColor: 'red'}}>
        <Text style={{margin: 20, textAlign: 'center',backgroundColor: 'white'}}>文本样式继承</Text>
        <View style={{marginHorizontal: 20,alignSelf: 'flex-start', backgroundColor: '#333333'}}>
          <Text style={{color: 'white',marginHorizontal: 20}}>
            <Text style={{color: 'red'}} >
              文本元素{'\n'}
              <Text
                style={{ backgroundColor: 'yellow'}}
                numberOfLines={1}
                ellipsizeMode="clip">
                我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的{'\n'}
                我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的我是白色的还是红色的{'\n'}
              </Text>
            </Text>
            <Text>我是白色的还是红色的</Text>
          </Text>
        </View>
      </View>

numberOfLines does not work!

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@hramos hramos closed this as completed Sep 1, 2017
@xclidongbo
Copy link
Author

Is there no solution?

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

No branches or pull requests

3 participants