react-native-textinput-effects icon indicating copy to clipboard operation
react-native-textinput-effects copied to clipboard

Prop 'selectTextOnFocus' doesn't work on iOS

Open schrulnz opened this issue 5 years ago • 0 comments

I want the text of a Kohona element to be selected as soon as the TextInput is klicked. This works fine on Android, but on iOS it doesn't. I already had a look at the Kohona.js file of the library but I couldn't find the problem.

I also tried clearTextOnFocus, this works fine on iOS. Also, if I use a normal RN <TextInput ... />, it works as well.

Some of my dependencies: "react": "16.9.0", "react-native": "0.61.5", "react-native-textinput-effects": "0.6.1",

This is my code:


                    import {Hideo, Kohana, Kaede} from 'react-native-textinput-effects';
                    // ...
                    <Kohana
                        inputStyle={[styles.inputStyle, {color: '#666'}]}
                        labelStyle={styles.label}
                        label={typeOfPoints}
                        labelContainerStyle={{ padding: 5 }}
                        iconClass={AwesomeIcon}
                        iconName={'bar-chart'}
                        iconColor={'#000'}
                        iconContainerStyle={{ padding: 10 }}
                        inputPadding={16}
                        returnKeyType={'done'}
                        keyboardType={'phone-pad'}
                        value={value}
                        onChangeText={(input) => this.setPoints(typeOfPoints, input)}
                        selectTextOnFocus={true}
                        useNativeDriver
                    />

schrulnz avatar Sep 08 '20 15:09 schrulnz