React-native-paper: Chip does not apply text wrapping properly using textStyle prop

Created on 9 Jul 2019  路  1Comment  路  Source: callstack/react-native-paper

Environment

Environment: Android

Description

The Chip component does not wrap long text even when setting styles in textStyle prop and style prop:

<Chip textStyle={{ flexWrap: 'wrap' }} style={{ flexDirection: "row" }}>{message.text}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</Chip>

image

Expected behavior

When using the following:

<View style={{ flexDirection: 'row'}}>
  <Text style={{ flexWrap: 'wrap' }}>{message.text}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</Text>
</View>

Note: The message.text contains a new line character.

image

>All comments

Chip should be a compact component which contains only the most important information. I think that multiline option shouldn't be supported (it's against MD guidelines).

Was this page helpful?
0 / 5 - 0 ratings