Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

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

            }

            return Content(jsonResult);

        }


I've attached my client code.