Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text overflow on Android #104

Open
NalinKamboj opened this issue Jul 3, 2019 · 1 comment
Open

Text overflow on Android #104

NalinKamboj opened this issue Jul 3, 2019 · 1 comment

Comments

@NalinKamboj
Copy link

I'm currently using this library with React Native 0.59.9, and I've been using the Hoshi effect. The text currently overflows on the right side due to the 'inputPadding' attribute. Setting it to 0 removes any overflow, but makes the label and input stick to each other.
Setting inputPadding to any number moves the overflow text to the right by that number. See the example image below where inputPadding has been set to 16.

Screenshot_20190703-112621_Trinity Live__01

Any workaround/help appreciated.

Thanks!

@adrianocola
Copy link

There is no way to fix that only using styles, because the width of the TextInput is set by this lib. But you can make it work if you change the line 68 to width: width - ( 2 * inputPadding),

<TextInput
ref={this.input}
{...this.props}
style={[
styles.textInput,
inputStyle,
{
width,
height: inputHeight,
left: inputPadding,
},
]}
value={value}
onBlur={this._onBlur}
onChange={this._onChange}
onFocus={this._onFocus}
underlineColorAndroid={'transparent'}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants