Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Encoded to handle URL specific chars such as #
  • Loading branch information
6gal6ler6 committed Mar 3, 2023
commit 01dc884220fcd001ba1b85cd9561a3e79fa60c1f
4 changes: 2 additions & 2 deletions src/controls/listItemAttachments/ListItemAttachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
directionalHint={DirectionalHint.rightCenter}>

<DocumentCard
onClickHref={!openAttachmentsInNewWindow && `${file.ServerRelativeUrl}?web=1`}
onClick={openAttachmentsInNewWindow && (() => window.open(`${file.ServerRelativeUrl}?web=1`, "_blank"))} // JJ - 20200613 - needed to support Microsoft Teams
onClickHref={!openAttachmentsInNewWindow && `${encodeURIComponent(file.ServerRelativeUrl)}?web=1`}
onClick={openAttachmentsInNewWindow && (() => window.open(`${encodeURIComponent(file.ServerRelativeUrl)}?web=1`, "_blank"))} // JJ - 20200613 - needed to support Microsoft Teams
className={styles.documentCard}>
<DocumentCardPreview previewImages={[previewImage]} />
<Label className={styles.fileLabel}>{fileName}</Label>
Expand Down