fix(core): disable re-rendering of pdf embed view (#9334)

This commit is contained in:
fundon
2024-12-26 08:08:11 +00:00
parent 71b5cddea1
commit 1afdb68143

View File

@@ -604,7 +604,10 @@ export function patchForMobile() {
} }
export function patchForAttachmentEmbedViews( export function patchForAttachmentEmbedViews(
reactToLit: (element: ElementOrFactory) => TemplateResult reactToLit: (
element: ElementOrFactory,
rerendering?: boolean
) => TemplateResult
): ExtensionType { ): ExtensionType {
return { return {
setup: di => { setup: di => {
@@ -626,7 +629,8 @@ export function patchForAttachmentEmbedViews(
reactToLit( reactToLit(
<AttachmentPreviewErrorBoundary key={model.id}> <AttachmentPreviewErrorBoundary key={model.id}>
<PDFViewerEmbedded {...buildAttachmentProps(model)} /> <PDFViewerEmbedded {...buildAttachmentProps(model)} />
</AttachmentPreviewErrorBoundary> </AttachmentPreviewErrorBoundary>,
false
), ),
})); }));
}, },