From 4f86f46c66da8666b2efa03a477f159fef2f52b4 Mon Sep 17 00:00:00 2001 From: Shyam Guthikonda Date: Tue, 5 Sep 2023 15:33:45 -0700 Subject: [PATCH] ScheduleTable TS conversion --- .../{SchedulesTable.js => SchedulesTable.tsx} | 1 - packages/desktop-client/src/components/table.tsx | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) rename packages/desktop-client/src/components/schedules/{SchedulesTable.js => SchedulesTable.tsx} (99%) diff --git a/packages/desktop-client/src/components/schedules/SchedulesTable.js b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx similarity index 99% rename from packages/desktop-client/src/components/schedules/SchedulesTable.js rename to packages/desktop-client/src/components/schedules/SchedulesTable.tsx index 7b66b915104..e6b625c2dd7 100644 --- a/packages/desktop-client/src/components/schedules/SchedulesTable.js +++ b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx @@ -193,7 +193,6 @@ export function SchedulesTable({ onSelect(item.id)} style={{ cursor: 'pointer', diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsx index 504ff46393a..6f5d1b97585 100644 --- a/packages/desktop-client/src/components/table.tsx +++ b/packages/desktop-client/src/components/table.tsx @@ -858,7 +858,7 @@ type TableProps = { items: TableItem[]; count?: number; headers?: ReactNode | TableHeaderProps['headers']; - contentHeader: ReactNode; + contentHeader?: ReactNode; loading: boolean; rowHeight?: number; backgroundColor?: string; @@ -871,16 +871,15 @@ type TableProps = { position: number; }) => ReactNode; renderEmpty?: ReactNode | (() => ReactNode); - getItemKey: (index: number) => TableItem['id']; + getItemKey?: (index: number) => TableItem['id']; loadMore?: () => void; style?: CSSProperties; - navigator: ReturnType; - listRef; - onScroll: () => void; + navigator?: ReturnType; + onScroll?: () => void; version?: string; allowPopupsEscape?: boolean; isSelected?: (id: TableItem['id']) => boolean; - saveScrollWidth: (parent, child) => void; + saveScrollWidth?: (parent, child) => void; }; export const Table = forwardRef( @@ -899,7 +898,6 @@ export const Table = forwardRef( loadMore, style, navigator, - listRef, onScroll, version = 'v1', allowPopupsEscape,