mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Clean up some grossness in ScrollResponder
Summary: Still gross but less gross. Reviewed By: sebmarkbage Differential Revision: D7107180 fbshipit-source-id: 31f1639a8f44e4ab247c338001a4a5c9b4b83cdf
This commit is contained in:
committed by
Facebook Github Bot
parent
8102e35271
commit
a275eac56e
@@ -16,6 +16,8 @@
|
||||
const Platform = require('Platform');
|
||||
const UIManager = require('UIManager');
|
||||
|
||||
const inputs = new Set();
|
||||
|
||||
const TextInputState = {
|
||||
/**
|
||||
* Internal state
|
||||
@@ -68,7 +70,19 @@ const TextInputState = {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
registerInput: function(textFieldID: number) {
|
||||
inputs.add(textFieldID);
|
||||
},
|
||||
|
||||
unregisterInput: function(textFieldID: number) {
|
||||
inputs.delete(textFieldID);
|
||||
},
|
||||
|
||||
isTextInput: function(textFieldID: number) {
|
||||
return inputs.has(textFieldID);
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = TextInputState;
|
||||
|
||||
Reference in New Issue
Block a user