React-native: [Layout] `text-overflow:ellipsis` in a View ?

Created on 6 Nov 2015  Â·  5Comments  Â·  Source: facebook/react-native

I already know there is a feature numberOfLines used on Text.

But it can't be work when I have a RICH-TEXT paragraph which includes some Image elements.

So I can't make a pretty text ellipsis on the line end. Then overflow:hidden is not always suitable in this case, it might result in text truncation.

For example:
2015-11-06 9 02 05

The best feature should like: 人 (求...

Does anybody know a better way to solve it?

Ran Commands Locked

Most helpful comment

You can achieve same effect with <Text numberOfLines ={1}>long long text<Text>

All 5 comments

For me, this question is also relevant

You can achieve same effect with <Text numberOfLines ={1}>long long text<Text>

@facebook-github-bot answered

Closing this issue as @Kureev says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

This was NOT answered, because the original question stated that this is a problem when NOT using Text and the solution is based on the usage of Text... I also want ellipsis on View, not on Text.

Was this page helpful?
0 / 5 - 0 ratings