Skip to content

Commit

Permalink
fix(editor-3001): objects stringified in data grid (#28053)
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE authored Jan 29, 2025
1 parent d28991b commit 9c5897f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/scenes/data-warehouse/editor/OutputPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ export function OutputPane(): JSX.Element {
return response?.results?.map((row: any[]) => {
const rowObject: Record<string, any> = {}
response.columns.forEach((column: string, i: number) => {
rowObject[column] = row[i]
// Handling objects here as other viz methods can accept objects. Data grid does not for now
if (typeof row[i] === 'object' && row[i] !== null) {
rowObject[column] = JSON.stringify(row[i])
} else {
rowObject[column] = row[i]
}
})
return rowObject
})
Expand Down

0 comments on commit 9c5897f

Please sign in to comment.