NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Long text in picker not wrapping to next line in android and the selected text doesn't wrap in either android/ios

Open Aayushi1301 opened this issue 6 years ago • 2 comments

I have gone through these following points

  • [x] Check latest documentation: https://docs.nativebase.io/
  • [x] Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
  • [x] Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
  • [] Check examples from NativeBase KitchenSink https://github.com/GeekyAnts/NativeBase-KitchenSink
  • [] For discussion purpose make use of NativeBase Slack: http://slack.nativebase.io/
  • [] For queries related to theme, check Theme Variables from Docs and live NativeBase Theme Editor http://nativebase.io/customizer/

Issue Description

I am using Picker from React https://docs.nativebase.io/Components.html#picker-def-headref but I have long text in the list which gets truncated on both ios and android after selection whereas on the picker it gets truncated on android. I have tried flexWrap, flexShrink but they don't help. I have latest react native and native base versions.

Expected behaviour

Text should wrap to new line in case of lengthy text

Actual behaviour

Text gets truncated

Steps to reproduce

I created a simple Picker with two picker options from documentation: import React, { Component } from "react"; import { Container, Header, Content, Picker, Form } from "native-base";

export default class PickerExample extends Component { constructor(props) { super(props); this.state = { selected: "key1" }; } onValueChange(value: string) { this.setState({ selected: value }); } render() { return (

<Picker.Item label="Wallet" value="key0" /> <Picker.Item label="LongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongText" value="key1" />
); } }

Screenshots:- Picker on ios(Text gets wrapped to next line as expected) image

Selected value on ios(Text gets truncated) image

Picker on android(Text gets truncated) image

Selected value on android(Text gets truncated) image

Is the bug present in both iOS and Android or in any one of them?

both

Aayushi1301 avatar Sep 21 '20 11:09 Aayushi1301

Hi @Aayushi1301 , Text is supposed to be truncated on both iOS and android after selection whereas on the picker it gets truncated on android because its Native behavior is inherited from 'react-native'.

hanykumar avatar Sep 28 '20 10:09 hanykumar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 21 '20 11:12 stale[bot]