mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Fix onSelectionChange "this" binding
Reviewed By: tadeuzagallo Differential Revision: D2660071 fb-gh-sync-id: 3fc50c0af8566dd7db5a56b220df979625673d07
This commit is contained in:
committed by
facebook-github-bot-4
parent
e4f0971a55
commit
7aa789ad57
@@ -414,7 +414,7 @@ var TextInput = React.createClass({
|
||||
|
||||
var onSelectionChange;
|
||||
if (this.props.selectionState || this.props.onSelectionChange) {
|
||||
onSelectionChange = function(event: Event) {
|
||||
onSelectionChange = (event: Event) => {
|
||||
if (this.props.selectionState) {
|
||||
var selection = event.nativeEvent.selection;
|
||||
this.props.selectionState.update(selection.start, selection.end);
|
||||
|
||||
Reference in New Issue
Block a user