Implement setMostRecentEventCount as view command

Summary: Changelog: Add view command `TextInput.setMostRecentEventCount`

Reviewed By: JoshuaGross

Differential Revision: D19789587

fbshipit-source-id: a52456cf5d39e25c730bbb2840009220b2242f87
This commit is contained in:
Samuel Susla
2020-02-07 14:10:28 -08:00
committed by Facebook Github Bot
parent 6e7369e1fd
commit 111f04ff11
@@ -117,6 +117,14 @@ RCT_EXPORT_METHOD(blur : (nonnull NSNumber *)viewTag)
}];
}
RCT_EXPORT_METHOD(setMostRecentEventCount : (nonnull NSNumber *)viewTag eventCount:(NSInteger)eventCount)
{
[self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
RCTBaseTextInputView *view = (RCTBaseTextInputView *)viewRegistry[viewTag];
view.mostRecentEventCount = eventCount;
}];
}
#pragma mark - RCTUIManagerObserver
- (void)uiManagerWillPerformMounting:(__unused RCTUIManager *)uiManager