react-native-web
react-native-web copied to clipboard
fix(Text): Support ellipsizeMode="clip"
The Text component supports different options for ellipsizeMode,
rather than assuming a trailing-edge '...'.
This change adds support for ellipsizeMode="clip" -- but only in one
special case: numberOfLines={1}. This is because that's all that is
supported by the browser vendors at the moment, so it's the best that
can be done by pure CSS.
Additionally, ths expands the handling of numerOfLines to accommodate
the value 0, as react-native specifies that a value of 0 is the
same as not specifying anything.
I realize that this fixes two bugs in one change; I'm more than happy to split them into separate PRs if you'd prefer :)
Going to close this because a number of changes have been made since this PR. Feel free to create a new PR on top of master. Thanks