Changeset View
Changeset View
Standalone View
Standalone View
native/components/clearable-text-input.react.ios.js
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | render(): React.Node { | ||||
const textInputs = []; | const textInputs = []; | ||||
if (this.state.textInputKey > 0) { | if (this.state.textInputKey > 0) { | ||||
textInputs.push( | textInputs.push( | ||||
<TextInput | <TextInput | ||||
{...props} | {...props} | ||||
style={[props.style, styles.invisibleTextInput]} | style={[props.style, styles.invisibleTextInput]} | ||||
onChangeText={this.onOldInputChangeText} | onChangeText={this.onOldInputChangeText} | ||||
onSelectionChange={this.props.onSelectionChange} | |||||
onKeyPress={this.onOldInputKeyPress} | onKeyPress={this.onOldInputKeyPress} | ||||
onBlur={this.onOldInputBlur} | onBlur={this.onOldInputBlur} | ||||
onFocus={this.onOldInputFocus} | onFocus={this.onOldInputFocus} | ||||
key={this.state.textInputKey - 1} | key={this.state.textInputKey - 1} | ||||
/>, | />, | ||||
); | ); | ||||
} | } | ||||
textInputs.push( | textInputs.push( | ||||
<TextInput | <TextInput | ||||
{...props} | {...props} | ||||
onFocus={this.onFocus} | onFocus={this.onFocus} | ||||
onBlur={this.onBlur} | onBlur={this.onBlur} | ||||
onChangeText={this.props.onChangeText} | onChangeText={this.props.onChangeText} | ||||
onSelectionChange={this.props.onSelectionChange} | |||||
key={this.state.textInputKey} | key={this.state.textInputKey} | ||||
ref={this.textInputRef} | ref={this.textInputRef} | ||||
/>, | />, | ||||
); | ); | ||||
return <View style={styles.textInputContainer}>{textInputs}</View>; | return <View style={styles.textInputContainer}>{textInputs}</View>; | ||||
} | } | ||||
} | } | ||||
Show All 12 Lines |