File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.PdfReader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export async function setUrl(id, url) {
3636
3737 const { options } = pdf ;
3838 options . url = url ;
39+ options . data = null ;
3940 await loadPdf ( pdf ) ;
4041}
4142
@@ -48,8 +49,8 @@ export async function setData(id, data) {
4849 }
4950
5051 const { options } = pdf ;
51- options . url = objectUrl ;
52- options . data = null ;
52+ options . url = null ;
53+ options . data = data ; ;
5354 await loadPdf ( pdf ) ;
5455}
5556
@@ -178,7 +179,10 @@ const disposePdf = pdf => {
178179 const viewContainer = el . querySelector ( ".bb-view-container" ) ;
179180 if ( viewContainer ) {
180181 [ ...viewContainer . children ] . forEach ( i => {
181- if ( ! i . classList . contains ( "pdfViewer" ) ) {
182+ if ( i . classList . contains ( "pdfViewer" ) ) {
183+ i . innerHTML = "" ;
184+ }
185+ else {
182186 i . remove ( ) ;
183187 }
184188 } )
You can’t perform that action at this time.
0 commit comments