diff --git a/web/packages/design/src/DataTable/Cells.tsx b/web/packages/design/src/DataTable/Cells.tsx index 2bf170b461e30..a85c5f28f8b71 100644 --- a/web/packages/design/src/DataTable/Cells.tsx +++ b/web/packages/design/src/DataTable/Cells.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import { TdHTMLAttributes } from 'react'; - import { Theme } from 'design/theme'; import Label from '../Label'; @@ -26,7 +24,8 @@ import * as Icons from '../Icon'; import { displayDate } from '../datetime'; -import { +import type { ReactNode, TdHTMLAttributes } from 'react'; +import type { ServersideProps, SortDir, TableColumn, @@ -58,6 +57,7 @@ export function SortHeaderCell({ {text} = { column: TableColumn; serversideProps?: ServersideProps; - text: string; + text: string | ReactNode; dir?: SortDir; onClick: () => void; }; diff --git a/web/packages/design/src/DataTable/types.ts b/web/packages/design/src/DataTable/types.ts index 14f7c1344a99f..05908a94db8cb 100644 --- a/web/packages/design/src/DataTable/types.ts +++ b/web/packages/design/src/DataTable/types.ts @@ -20,6 +20,8 @@ import { MatchCallback } from 'design/utils/match'; import { Pagination } from './useTable'; +import type { ReactNode } from 'react'; + export type TableProps = { data: T[]; columns: TableColumn[]; @@ -91,7 +93,8 @@ export type TableProps = { }; type TableColumnBase = { - headerText?: string; + headerText?: string | ReactNode; + ariaLabel?: string; render?: (row: T) => JSX.Element; isSortable?: boolean; onSort?: (a: T, b: T) => number; diff --git a/web/packages/teleport/src/components/hooks/useUrlFiltering/encodeUrlQueryParams.ts b/web/packages/teleport/src/components/hooks/useUrlFiltering/encodeUrlQueryParams.ts index fbcbf0217f917..324d17432e33d 100644 --- a/web/packages/teleport/src/components/hooks/useUrlFiltering/encodeUrlQueryParams.ts +++ b/web/packages/teleport/src/components/hooks/useUrlFiltering/encodeUrlQueryParams.ts @@ -33,7 +33,7 @@ export function encodeUrlQueryParams({ sort, kinds, isAdvancedSearch = false, - pinnedOnly = false, + pinnedOnly, }: EncodeUrlQueryParamsProps) { const urlParams = new URLSearchParams();