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 c5b849a commit d90899f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## 2.5

### 2.5.5 (2024-04-22)
- TableWidget: support for object values [#867](https://github.com/CartoDB/carto-react/pull/867)

### 2.5.4 (2024-04-22)

- TimeSeriesWidget: fix echarts props update, to keep state of control when clicking [#865](https://github.com/CartoDB/carto-react/pull/865)
Expand Down
2 changes: 2 additions & 0 deletions packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js
Original file line number Diff line number Diff line change
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 d90899f

Please sign in to comment.