diff --git a/CHANGELOG.md b/CHANGELOG.md index de6329668..ab30048f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Not released +- Fix TableWidget not displaying quadbin field for a table with spatial index [#799](https://github.com/CartoDB/carto-react/pull/799) + ## 2.2 ### 2.2.14 (2023-10-25) diff --git a/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js b/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js index 624011d4c..fe8fac517 100644 --- a/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js +++ b/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js @@ -180,9 +180,12 @@ function TableBodyComponent({ columns, rows, onRowClick }) { onClick={() => onRowClick && onRowClick(row)} > {columns.map(({ field, headerName, align, component }) => { - const cellValue = Object.entries(row).find(([key]) => { + let cellValue = Object.entries(row).find(([key]) => { return key.toUpperCase() === field.toUpperCase(); })?.[1]; + if (typeof cellValue === 'bigint') { + cellValue = cellValue.toString(); // otherwise TableCell will fail for displaying it + } return ( (headerName || field) && (