The Blazor stuff was Blazor 3.1.0-preview4.19579.2.
If I create an annotation as a user using the UI, no problem, works as expected.
HOWEVER, if I manually import the annotations programmatically then it likely will throw the following error when I attempt to select an annotation:
TypeError: o.annotationSelectorSettings is undefined
Ideally, I want to be able to click upon an annotation, receive information about the selected annotation in the event args (which I think it will if it quits crashing), and then choose programmatically whether or not I wish to delete the annotation, without using pre-defined YOUR UI. What this code does is captures the TextSelectionEnd, popup a dialog and ask what label to assign, and then programmatically import the annotation. Selecting those annotations tend to throw an exception, my suspicion is my use case was not anticipated and something was not initialized.
The backend service is your typical one for a PDF Viewer with one change for the Import Annotations routine, basically the client is supplying the json instead of reading it from a file.
public IActionResult ImportAnnotations([FromBody] Dictionary jsonObject)
string jsonResult = string.Empty;
if (jsonObject != null && jsonObject.ContainsKey("fileName"))
jsonResult = jsonObject["fileName"]; // i am going to provide the json directly
I've attached my client code.