Skip to content

Commit

Permalink
[Dust Apps] Fix dataset descriptions shuffled (#5765)
Browse files Browse the repository at this point in the history
Description
---
Fixes dust-tt/tasks#893

Dataset keys and descr in 2 different arrays rely on matching by
indices, but are not initially computed with indices matching. This
initial computation is corrected in this PR

Risk & deploy
---
na
  • Loading branch information
philipperolet authored Jun 20, 2024
1 parent 9175118 commit 06c932c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion front/components/app/DatasetView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ export default function DatasetView({
);
const [datasetKeyDescriptions, setDatasetKeyDescriptions] = useState<
string[]
>((schema || []).map((s) => s.description || ""));
>(
datasetKeys.map((k) => schema?.find((s) => s.key === k)?.description || "")
);

const [datasetTypes, setDatasetTypes] = useState<DatasetDataType[]>([]);
const [datasetInitializing, setDatasetInitializing] = useState(true);

Expand Down

0 comments on commit 06c932c

Please sign in to comment.