React-native-google-places-autocomplete: Results longer than one line don't wrap with scroll disabled

Created on 10 Oct 2020  路  2Comments  路  Source: FaridSafi/react-native-google-places-autocomplete

Describe the bug

When setting isRowScrollable={false}, I would expect the text for results wider than one line to wrap or be truncated. At the moment they seem to extend beyond the width of the container meaning that the end of the text is cut-off.

This seems to be because the in _renderRow has an unconstrained width. Is there some configuration/styling I am missing to fix this or is this a bug? It seems that the style of the ScrollView and TouchableHighlight need to be customised to make this work which is not currently possible

Reproduction - (required - issue will be closed without this)

https://snack.expo.io/@robertnash/react-native-google-places-text-wrapping

Additional context

  • Library Version: 2.0.2
  • React Native Version: 0.63.2

  • [ Not tested] iOS

  • [ x ] Android
  • [ x ] Web

If you are using expo please indicate here:

  • [ x ] I am using expo

Add any other context about the problem here, screenshots etc

image

bug

All 2 comments

This is a good catch. I just made a change to this, and I tested it quite thoroughly, but only on iOS. It seems to works properly on iOS, but not android and the web. I am taking a look now.

Also, thank you for the awesome reproduction and bug report!

Released as 2.0.3. I made one small change, because using flex: 1 in the contentContainerStyle caused a bug with ellipsis text when isRowScrollable={false}.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RajanPN picture RajanPN  路  3Comments

akhlopyk picture akhlopyk  路  3Comments

lukBakTsh picture lukBakTsh  路  3Comments

sohel-tech picture sohel-tech  路  3Comments

aymkin picture aymkin  路  4Comments