diff --git a/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js b/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js index fe8fac517..75fcba819 100644 --- a/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js +++ b/packages/react-ui/src/widgets/TableWidgetUI/TableWidgetUI.js @@ -185,6 +185,10 @@ function TableBodyComponent({ columns, rows, onRowClick }) { })?.[1]; if (typeof cellValue === 'bigint') { cellValue = cellValue.toString(); // otherwise TableCell will fail for displaying it + } else if (Array.isArray(cellValue)) { + cellValue = `[${cellValue + .map((c) => (typeof c === 'string' ? `"${c}"` : c)) + .join(', ')}]`; } return ( (headerName || field) && ( diff --git a/packages/react-widgets/src/models/utils.js b/packages/react-widgets/src/models/utils.js index 222999156..957d13360 100644 --- a/packages/react-widgets/src/models/utils.js +++ b/packages/react-widgets/src/models/utils.js @@ -65,6 +65,8 @@ export function formatTableNameWithFilters(props) { export function normalizeObjectKeys(el) { if (Array.isArray(el)) { return el.map(normalizeObjectKeys); + } else if (typeof el !== 'object') { + return el; } return Object.entries(el).reduce((acc, [key, value]) => {