diff --git a/DashAI/front/src/components/threeSectionLayout/ItemBox.jsx b/DashAI/front/src/components/threeSectionLayout/ItemBox.jsx index 30f2d4882..49fa7c083 100644 --- a/DashAI/front/src/components/threeSectionLayout/ItemBox.jsx +++ b/DashAI/front/src/components/threeSectionLayout/ItemBox.jsx @@ -87,7 +87,9 @@ export default function ItemBox({ bgcolor: isSelected ? theme.palette.action.selected : "transparent", p: 0.5, "&:hover": { - backgroundColor: theme.palette.action.hover, + backgroundColor: isSelected + ? theme.palette.action.selected + : theme.palette.action.hover, }, }} onClick={isSelected || isEditing ? undefined : onClick} diff --git a/DashAI/front/src/hooks/datasets/useDatasets.js b/DashAI/front/src/hooks/datasets/useDatasets.js index 32fcf092e..7069824ff 100644 --- a/DashAI/front/src/hooks/datasets/useDatasets.js +++ b/DashAI/front/src/hooks/datasets/useDatasets.js @@ -22,7 +22,11 @@ export function useDatasets({ t }) { newDatasets.map(async (dataset) => { const existing = existingDatasets.find((d) => d.id === dataset.id); - if (existing) { + if ( + existing && + existing.total_rows !== undefined && + existing.total_columns !== undefined + ) { return { ...dataset, total_rows: existing.total_rows,