react-native-material-textfield icon indicating copy to clipboard operation
react-native-material-textfield copied to clipboard

Floating label is not properly alligned while set arabic language and set textalign right

Open kushalshah-invx opened this issue 6 years ago • 1 comments

Hello guys,

You guys have done a great job by creating such a great library. Though I am stuck in one issue and need input in that case.

We are facing a label alignment issue when tapping on text input while viewing is for Arabic. We have set manually set text alight to 'right' for Arabic. It is working absolutely fine for English though.

Below is my code & problem screen shot: <TextField maxLength={this.props.maxLength} secureTextEntry={this.props.secureTextEntry} name={this.props.name} fontSize={13} style={{ fontFamily: font.MEDIUM, textAlign: this.props.auth.isRTL ? 'right' : 'left', marginRight: this.props.auth.isRTL ? 0 : 3, marginLeft: this.props.auth.isRTL ? 0 : 3, marginTop: 2, }} textColor={colors.BLACK} tintColor={colors.BLUE} labelTextStyle={{ marginTop: 3, color: colors.GRAY, fontFamily: font.REGULAR, textAlign: this.props.auth.isRTL ? 'right' : 'left', }} label={this.props.label} value={this.props.value} lineWidth={1} keyboardType={this.props.keyboardType} ref={input => (this.textInput = input)} error={''} renderLeftAccessory={() => this.props.auth.isRTL ? this.renderRightComponent() : this.renderLeftComponent() } renderRightAccessory={() => this.props.auth.isRTL ? this.renderLeftComponent() : this.renderRightComponent() } onSubmitEditing={() => { this.props.onSubmitEditing(); }} onChangeText={e => { let name = this.props.name; this.props.handleChange(name, e); }} onBlur={e => { let name = this.props.name; this.props.handleOnBlur(name, e); }} />

Simulator Screen Shot - iPhone 11 - 2020-04-25 at 16 24 48

Looking forward to your reply.

Thank you

kushalshah-invx avatar Apr 25 '20 11:04 kushalshah-invx

any updates?

HarshitPadalia avatar Aug 13 '20 10:08 HarshitPadalia