Skip to content

Commit

Permalink
TableWidget: support for object values (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
padawannn committed Apr 22, 2024
1 parent 1a8d8e2 commit 581c06c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,7 @@

## Not released

- TableWidget: support for object values [#867](https://github.com/CartoDB/carto-react/pull/867)
- TimeSeriesWidget: fix echarts props update, to keep state of control when clicking [#865](https://github.com/CartoDB/carto-react/pull/865)
- TimeSeriesWidget: support removing series in mounted widget [#863](https://github.com/CartoDB/carto-react/pull/863)

Expand Down
2 changes: 2 additions & 0 deletions packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js
Expand Up @@ -204,6 +204,8 @@ function TableBodyComponent({ columns, rows, onRowClick }) {
cellValue = `[${cellValue
.map((c) => (typeof c === 'string' ? `"${c}"` : c))
.join(', ')}]`;
} else if (typeof cellValue === 'object' && cellValue !== null) {
cellValue = JSON.stringify(cellValue);
}
return (
(headerName || field) && (
Expand Down

0 comments on commit 581c06c

Please sign in to comment.