I have a page where users select a row in a grid to change the document that should be loaded into the PdfViewer component (Blazor serverside). They will not have the ability to use the open document button or select document button provided by the component.
When I select a row in the grid, the PdfViewer component shows the corresponding pdf properly. However, if the page gets in a state where there are no rows in that grid, I want the PdfViewer component to revert to an empty state. It should not be showing the previously selected PDF.
I have tried the following based on a previous post (https://www.telerik.com/forums/how-do-i-clear-the-pdfviewer):
-setting the byte array to []
-setting the byte array to null
-calling Rebind on the PdfViewer component
-calling StateHasChanged
-having the method changing the byte array be synchronous and asynchronous
Setting the byte array to [] just flashes the loading indicator briefly but the component still shows the previous pdf. Setting the byte array to null just keeps the loading indicator displayed indefinitely with the previously displayed pdf underneath. The other suggestions had no other effect.
How do I unload the PDF from the PdfViewer component?