1212#import < React/RCTConvert.h>
1313#import < React/RCTFont.h>
1414#import < React/RCTUIManager.h>
15+ #import < React/RCTComponentEvent.h>
1516
1617@implementation RNTableViewManager
1718
@@ -253,7 +254,10 @@ - (NSDictionary *)constantsToExport {
253254
254255RCT_EXPORT_METHOD (sendNotification:(NSDictionary *)data)
255256{
256- [self .bridge.eventDispatcher sendInputEventWithName: @" onItemNotification" body: data];
257+ RCTComponentEvent *event = [[RCTComponentEvent alloc ] initWithName: @" onItemNotification"
258+ viewTag: nil
259+ body: data];
260+ [self .bridge.eventDispatcher sendEvent: event];
257261}
258262
259263RCT_EXPORT_METHOD (scrollTo:(nonnull NSNumber *)reactTag
@@ -276,7 +280,7 @@ - (NSDictionary *)constantsToExport {
276280 [self .bridge.uiManager addUIBlock:
277281 ^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry){
278282 RNTableView *tableView = viewRegistry[reactTag];
279-
283+
280284 if ([tableView isKindOfClass: [RNTableView class ]]) {
281285 [tableView startRefreshing ];
282286 } else {
@@ -290,7 +294,7 @@ - (NSDictionary *)constantsToExport {
290294 [self .bridge.uiManager addUIBlock:
291295 ^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry){
292296 RNTableView *tableView = viewRegistry[reactTag];
293-
297+
294298 if ([tableView isKindOfClass: [RNTableView class ]]) {
295299 [tableView stopRefreshing ];
296300 } else {
@@ -307,7 +311,7 @@ - (NSDictionary *)constantsToExport {
307311 [self .bridge.uiManager addUIBlock:
308312 ^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry){
309313 RNTableView *tableView = viewRegistry[reactTag];
310-
314+
311315 if ([tableView isKindOfClass: [RNTableView class ]]) {
312316 [tableView scrollToIndex: index section: section animated: animated];
313317 } else {
0 commit comments