diff --git a/.changeset/wise-garlics-hang.md b/.changeset/wise-garlics-hang.md new file mode 100644 index 00000000..9d1c2ed9 --- /dev/null +++ b/.changeset/wise-garlics-hang.md @@ -0,0 +1,13 @@ +--- +'@kubed/code-editor': patch +'@kubed/diff-viewer': patch +'@kubed/components': patch +'@kubed/log-viewer': patch +'@kubed/charts': patch +'@kubed/hooks': patch +'@kubed/icons': patch +'@kubed/tests': patch +'kubed-documents': patch +--- + +fix: handle null rendering in BaseDataTable cell diff --git a/packages/components/src/Table/DataTable/BaseTable.tsx b/packages/components/src/Table/DataTable/BaseTable.tsx index 0f9080a7..7b6b77ab 100644 --- a/packages/components/src/Table/DataTable/BaseTable.tsx +++ b/packages/components/src/Table/DataTable/BaseTable.tsx @@ -65,7 +65,7 @@ export function BaseDataTable({ table }: BaseDataTableProps) { {...(getTdProps && getTdProps(table, cell.getContext()))} {...(cell.column.columnDef.meta?.td ?? {})} > - {flexRender(cell.column.columnDef.cell, cell.getContext())} + {flexRender(cell.column.columnDef.cell, cell.getContext()) ?? null} ))} diff --git a/packages/components/src/Table/DataTable/Table.tsx b/packages/components/src/Table/DataTable/Table.tsx index 06d8e849..0197a04a 100644 --- a/packages/components/src/Table/DataTable/Table.tsx +++ b/packages/components/src/Table/DataTable/Table.tsx @@ -1,7 +1,6 @@ import type { Header, Row, RowData, Table, TableState } from '@tanstack/react-table'; import cx from 'classnames'; import * as React from 'react'; -import styled from 'styled-components'; import * as BaseTable from '../BaseTable'; import { BaseDataTable } from './BaseTable'; import { Pagination, TableFooter } from './Pagination';