diff --git a/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts b/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts
index a1c5dc1558..74d5e6a05a 100644
--- a/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts
+++ b/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts
@@ -403,6 +403,11 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection {
void this.requestStateUpdate(true);
}
+ @property({
+ attribute: 'disable-open-on-click',
+ type: Boolean
+ })
+ public disableOpenOnClick = false;
/**
* A boolean value indication if 'show-more' button should be disabled
*
@@ -1007,7 +1012,7 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection {
}
private handleFileClick(file: DriveItem) {
- if (file?.webUrl) {
+ if (file?.webUrl && !this.disableOpenOnClick) {
window.open(file.webUrl, '_blank', 'noreferrer');
}
}
diff --git a/packages/mgt-element/src/utils/version.ts b/packages/mgt-element/src/utils/version.ts
index 47e7e300c1..37ce56a1d0 100644
--- a/packages/mgt-element/src/utils/version.ts
+++ b/packages/mgt-element/src/utils/version.ts
@@ -8,4 +8,4 @@
// THIS FILE IS AUTO GENERATED
// ANY CHANGES WILL BE LOST DURING BUILD
-export const PACKAGE_VERSION = '3.0.1';
+export const PACKAGE_VERSION = '3.1.1';
diff --git a/packages/mgt-react/src/generated/react.ts b/packages/mgt-react/src/generated/react.ts
index ed046f2aa4..9c39d5d2c2 100644
--- a/packages/mgt-react/src/generated/react.ts
+++ b/packages/mgt-react/src/generated/react.ts
@@ -58,6 +58,7 @@ export type FileListProps = {
itemView?: ViewType;
fileExtensions?: string[];
pageSize?: number;
+ disableOpenOnClick?: boolean;
hideMoreFilesButton?: boolean;
maxFileSize?: number;
enableFileUpload?: boolean;
diff --git a/stories/components/fileList/fileList.properties.js b/stories/components/fileList/fileList.properties.js
index b8510778f2..c8dca32920 100644
--- a/stories/components/fileList/fileList.properties.js
+++ b/stories/components/fileList/fileList.properties.js
@@ -94,6 +94,10 @@ export const getFileListByExtensions = () => html`
`;
+export const disableOpenOnClick = () => html`
+
+`;
+
export const disableFileExpansion = () => html`
`;