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,14 +86,16 @@ export const SelectionToolbar = ({
return [...currentHeaderLabels, columnLabel] return [...currentHeaderLabels, columnLabel]
}, []) }, [])
.concat( .concat(
resultHeader typebot?.resultsTablePreferences?.columnsOrder
.filter( ? resultHeader
(headerCell) => .filter(
!typebot?.resultsTablePreferences?.columnsOrder.includes( (headerCell) =>
headerCell.id !typebot?.resultsTablePreferences?.columnsOrder.includes(
headerCell.id
)
) )
) .map((headerCell) => headerCell.label)
.map((headerCell) => headerCell.label) : []
) )
const data = dataToUnparse.map<{ [key: string]: string }>((data) => { const data = dataToUnparse.map<{ [key: string]: string }>((data) => {