diff --git a/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx b/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx
index e3be718e86..b177f056d2 100644
--- a/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx
+++ b/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx
@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
import { useCopyToClipboard } from 'react-use';
import { DashboardData } from 'types/api/dashboard/getAll';
-import { downloadObjectAsJson } from './util';
+import { cleardQueryData, downloadObjectAsJson } from './util';
function ShareModal({
isJSONModalVisible,
@@ -51,6 +51,7 @@ function ShareModal({
}
}, [state.error, state.value, t]);
+ const selectedDataCleaned = cleardQueryData(selectedData);
const GetFooterComponent = useMemo(() => {
if (!isViewJSON) {
return (
@@ -66,7 +67,7 @@ function ShareModal({
);
- }, [isViewJSON, jsonValue, selectedData, setCopy, t]);
+ }, [isViewJSON, jsonValue, selectedData, selectedDataCleaned, setCopy, t]);
return (
({
+ ...widget,
+ queryData: {
+ ...widget.queryData,
+ data: {
+ queryData: [],
+ },
+ },
+ })),
+ };
+}