Skip to content

Commit 1ff0220

Browse files
authored
Merge pull request #309 from PSPDFKit/rad/add-annotation-name-to-payload-onAnnotationsChanged-when-removed
Add the annotation name to the `onAnnotationsChanged` payload when annotation is removed on iOS
2 parents d7c1af4 + 270b908 commit 1ff0220

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ @implementation RCTConvert (PSPDFAnnotation)
2323
[annotationsJSON addObject:annotationDictionary];
2424
}
2525
} else {
26-
// We only generate Instant JSON data for attached annotations. When an annotation is deleted, we only set the annotation uuid.
27-
[annotationsJSON addObject:uuidDict];
26+
// We only generate Instant JSON data for attached annotations. When an annotation is deleted, we only set the annotation uuid and name.
27+
[annotationsJSON addObject:@{@"uuid" : annotation.uuid, @"name" : annotation.name ?: [NSNull null]}];
2828
}
2929
}
3030

0 commit comments

Comments
 (0)