2
0

🐛 (results) Fix export duplicate columns when no order set

This commit is contained in:
Baptiste Arnaud
2023-06-26 17:41:48 +02:00
parent 6f7ef820e2
commit 3575fef34f

View File

@@ -86,7 +86,8 @@ export const SelectionToolbar = ({
return [...currentHeaderLabels, columnLabel] return [...currentHeaderLabels, columnLabel]
}, []) }, [])
.concat( .concat(
resultHeader typebot?.resultsTablePreferences?.columnsOrder
? resultHeader
.filter( .filter(
(headerCell) => (headerCell) =>
!typebot?.resultsTablePreferences?.columnsOrder.includes( !typebot?.resultsTablePreferences?.columnsOrder.includes(
@@ -94,6 +95,7 @@ export const SelectionToolbar = ({
) )
) )
.map((headerCell) => headerCell.label) .map((headerCell) => headerCell.label)
: []
) )
const data = dataToUnparse.map<{ [key: string]: string }>((data) => { const data = dataToUnparse.map<{ [key: string]: string }>((data) => {