Skip to content

fix: textInput label wrong position in RTL#564

Closed
iyadthayyil wants to merge 1 commit intocallstack:masterfrom
iyadthayyil:fix/textInput-label-wrong-position-rtl
Closed

fix: textInput label wrong position in RTL#564
iyadthayyil wants to merge 1 commit intocallstack:masterfrom
iyadthayyil:fix/textInput-label-wrong-position-rtl

Conversation

@iyadthayyil
Copy link
Contributor

Motivation

Fixes #562
whatsapp image 2018-09-30 at 4 20 28 pm 1
whatsapp image 2018-09-30 at 4 20 28 pm

Test plan

@callstack-bot
Copy link

Hey @iyadthayyil, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@iyadthayyil
Copy link
Contributor Author

Fixed screenshot:

whatsapp image 2018-09-30 at 10 06 04 pm

translateX: this.state.labeled.interpolate({
inputRange: [0, 1],
outputRange: [
I18nManager.isRTL ? (20 / 100) * this.state.labelLayout.width : 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain where these numbers come from?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@satya164 satya164 force-pushed the master branch 4 times, most recently from 1fed58c to 1cf7ae9 Compare October 11, 2018 12:28
@saharjedidi
Copy link

@iyadthayyil Please how can I fix the label position in RTL Mode
error
this is my code
<TextInput
mode='outlined'
label=' رقم بطاقة التعريف الوطنية'
numberOfLines={1}
style={this.getStyle().TextInp}
theme={{ colors: {placeholder: 'white', background:'#3489',text: 'white',primary: 'white'}}}
onChangeText={CIN => this.setState({CIN})}
onBlur={ this.onBlurCIN }
/>

@Trancever
Copy link
Contributor

@saharjedidi Did you try this branch? Currently there is a bug on master branch

@saharjedid
Copy link

@Trancever my version is "react-native-paper": "^2.2.4",
did you know what can i add in my code to fix the problem
i didn't find any documentation about this problem

@Trancever
Copy link
Contributor

Closing this in favour of #721

@Trancever Trancever closed this Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants