diff --git a/src/components/ServiceDetails/DataPreset/DashboardModal/ButtonGroup.js b/src/components/ServiceDetails/DataPreset/DashboardModal/ButtonGroup.js
index 6325da27..ccd1cdec 100644
--- a/src/components/ServiceDetails/DataPreset/DashboardModal/ButtonGroup.js
+++ b/src/components/ServiceDetails/DataPreset/DashboardModal/ButtonGroup.js
@@ -3,18 +3,13 @@ import { useStyles } from "./styles";
import StyledButton from "../../../common/StyledButton";
import TableIcon from "@mui/icons-material/TableChartOutlined";
import { useDispatch } from "react-redux";
-import {
- addRecentDataset,
- improveDataset,
- setMainDataset,
- setMergeDataset,
-} from "../../../../Redux/actionCreators/DatasetActions";
+import { addRecentDataset, improveDataset } from "../../../../Redux/actionCreators/DatasetActions";
import { startAppLoader, stopAppLoader } from "../../../../Redux/actionCreators/LoaderActions";
import { LoaderContent } from "../../../../utility/constants/LoaderContent";
import { DatafactoryInstanceS3 } from "../../../../config/DatasetS3Client";
import { getDatasetSizeFromS3 } from "../../../../Redux/actionCreators/ServiceTrainingActions";
-const ButtonsGroup = ({ classes, selectedParameters, isTableView, toggleTableView, dataset, index }) => {
+const ButtonsGroup = ({ classes, selectedParameters, isTableView, toggleTableView, dataset, setDataset }) => {
const dispatch = useDispatch();
const tableButtonText = isTableView ? "close tablet" : "view tablet";
@@ -37,7 +32,7 @@ const ButtonsGroup = ({ classes, selectedParameters, isTableView, toggleTableVie
tag: dataset.tag,
};
await dispatch(addRecentDataset(improvedDataset));
- !index ? await dispatch(setMainDataset(improvedDataset)) : await dispatch(setMergeDataset(improvedDataset));
+ setDataset(improvedDataset);
} catch (error) {
console.error("getImprovedDataset error", error);
} finally {
diff --git a/src/components/ServiceDetails/DataPreset/DashboardModal/index.js b/src/components/ServiceDetails/DataPreset/DashboardModal/index.js
index 118e6ece..f078037d 100644
--- a/src/components/ServiceDetails/DataPreset/DashboardModal/index.js
+++ b/src/components/ServiceDetails/DataPreset/DashboardModal/index.js
@@ -7,7 +7,7 @@ import TableSamples from "./Table";
import { useState } from "react";
import ButtonGroup from "./ButtonGroup";
-const DashboardModal = ({ classes, onClose, isShow, dataset, index }) => {
+const DashboardModal = ({ classes, onClose, isShow, dataset, setDatasetInfo }) => {
const [selectedParameters, setSelectedParameters] = useState();
const [isTableView, setIsTableView] = useState(true);
@@ -27,7 +27,7 @@ const DashboardModal = ({ classes, onClose, isShow, dataset, index }) => {
selectedParameters={selectedParameters}
isTableView={isTableView}
toggleTableView={toggleTableView}
- index={index}
+ setDataset={setDatasetInfo}
/>
{isTableView && dataset?.additionalInfo?.dataset_sample && (