修复 输入框 clear 失效的bug review by daiqiang
Showing
1 changed file
with
9 additions
and
0 deletions
@@ -118,7 +118,16 @@ export default class Detail extends Component { | @@ -118,7 +118,16 @@ export default class Detail extends Component { | ||
118 | relayToUsername = ''; | 118 | relayToUsername = ''; |
119 | } | 119 | } |
120 | this.props.onSubmitForComment && this.props.onSubmitForComment(content,replyTos); | 120 | this.props.onSubmitForComment && this.props.onSubmitForComment(content,replyTos); |
121 | + | ||
121 | this.refs.textInput.clear(); | 122 | this.refs.textInput.clear(); |
123 | + | ||
124 | + if (Platform.OS === 'ios') { | ||
125 | + this.refs.textInput.setNativeProps({ text: ' ' }); | ||
126 | + setTimeout(() => { | ||
127 | + this.refs.textInput.setNativeProps({ text: '' }); | ||
128 | + }); | ||
129 | + } | ||
130 | + | ||
122 | this.setState({replyTo: 0,relayToUsername: ''}); | 131 | this.setState({replyTo: 0,relayToUsername: ''}); |
123 | } | 132 | } |
124 | 133 |
-
Please register or login to post a comment