react-native-picker-modal-view icon indicating copy to clipboard operation
react-native-picker-modal-view copied to clipboard

How to resolve large item's text?

Open axdemelas opened this issue 4 years ago • 2 comments

I have a picker modal that some item's have more than 3 lines and this causes overlapping of the texts:

Screen Shot 2020-10-14 at 08 19 45

How can I force padding/margin between items?

axdemelas avatar Oct 14 '20 12:10 axdemelas

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.79. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Oct 14 '20 12:10 issue-label-bot[bot]

The same issue happens when a large font size is used.

The problem is in ListItemStyle.container used in ListItemComponent wich have a fixed height:

https://github.com/pankod/react-native-picker-modal-view/blob/fffb3c14a92f4c85be9e93a8286145ae27d0e199/src/Components/ListItem.tsx#L9

If you use a custom render item it does not happens.

renderListItem={(defaultSelected, item) => {
        return (
          <View style={ListItemStyle.btnContainer}>
            <Text style={[defaultSelected && item.Name === defaultSelected.Name && ListItemStyle.selected]}>
              {item.Name}
            </Text>
          </View>
        )
      }}

I belive this could be fixed if the fixed height is removed or the component accepts a custom style prop.

This is because the custom render touchable does not uses the ListItemStyle.container

boris-burgos avatar Jun 07 '21 09:06 boris-burgos