react-native-web
react-native-web copied to clipboard
ellipsizeMode on Text component does not work
The problem
ellipsizeMode
on Text
component does not work. the produced css is always text-overflow: ellipsis
regardless of the value of the ellipsizeMode e.g ellipsizeMode: "clip"
.
How to reproduce
Example: https://codesandbox.io/embed/mo1ylwmp08
Steps to reproduce:
- Create a clipped text with
ellipsizeMode
different thantail
<Text numberOfLines={1} ellipsizeMode="clip" > Example Text </Text>
- The text is always clipped with ellipsis regardless of the mode (head, clip...)
Expected behavior
ellipsizeMode = "clip"
generates text-overflow: clip
, for example, and not text-overflow: ellipsis
...
Environment (include versions). Did this work in previous versions?
- React Native for Web (version): 0.11.x
- React (version): 16.8.4
- Browser: Google Chrome
Somewhat related to this... ellipsizeMode: middle
will also not work as expected on web platforms as there is no CSS equivalent to cropping text in the middle.
override it with <Text ellipsizeMode='clip' color={'grey300'} style={{textOverflow:"clip"}} numberOfLines={1}>