diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm index ad2439179..2c351fde3 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm @@ -29,7 +29,9 @@ } - (id)childForNode:(CKComponentHostingView*)node atIndex:(NSUInteger)index { - return [SKComponentLayoutWrapper newFromRoot:node]; + return [SKComponentLayoutWrapper + newFromRoot:node + parentKey:[NSString stringWithFormat:@"%@.", node.uniqueIdentifier]]; } - (void)setHighlighted:(BOOL)highlighted forNode:(CKComponentHostingView*)node { diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h index 49d3e9871..9a7ed2a2d 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h @@ -24,7 +24,6 @@ @property(nonatomic, readonly) BOOL isFlexboxChild; @property(nonatomic, readonly) CKFlexboxComponentChild flexboxChild; -+ (instancetype)newFromRoot:(id)root; + (instancetype)newFromRoot:(id)root parentKey:(NSString*)parentKey; diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm index 33d958a95..7d2aafd28 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm @@ -47,10 +47,6 @@ static CKFlexboxComponentChild findFlexboxLayoutParams( @implementation SKComponentLayoutWrapper -+ (instancetype)newFromRoot:(id)root { - return [self newFromRoot:root parentKey:@""]; -} - + (instancetype)newFromRoot:(id)root parentKey:(NSString*)parentKey { const CKComponentLayout layout = [root mountedLayout]; diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm index 5a7940094..14371acb6 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm @@ -33,11 +33,9 @@ } - (id)childForNode:(CKComponentRootView*)node atIndex:(NSUInteger)index { - auto const attachState = CKGetAttachStateForView(node); return [SKComponentLayoutWrapper newFromRoot:node - parentKey:[NSString - stringWithFormat:@"%d.", attachState.scopeIdentifier]]; + parentKey:[NSString stringWithFormat:@"%@.", node.uniqueIdentifier]]; } - (NSArray*>*)dataForNode:(CKComponentRootView*)node {