From 5adb083575552d8eab54fcc1f2f32a6ad27b671c Mon Sep 17 00:00:00 2001 From: DJ Mountney <david@twkie.net> Date: Wed, 24 Jan 2024 11:13:43 -0800 Subject: [PATCH] :bug: Fix a missing ref param warning for forwardRef (#2277) * Fix a missing ref param warning for forwardRef - Drop unused usage of forwardRef on TableWithNavigator --- packages/desktop-client/src/components/table.tsx | 11 ++++++----- upcoming-release-notes/2277.md | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 upcoming-release-notes/2277.md diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsx index e7b164a84..d1c98ec48 100644 --- a/packages/desktop-client/src/components/table.tsx +++ b/packages/desktop-client/src/components/table.tsx @@ -848,13 +848,14 @@ type TableHandleRef<T extends TableItem = TableItem> = { type TableWithNavigatorProps = TableProps & { fields; }; -export const TableWithNavigator = forwardRef< - TableHandleRef<TableItem>, - TableWithNavigatorProps ->(({ fields, ...props }) => { + +export function TableWithNavigator({ + fields, + ...props +}: TableWithNavigatorProps) { const navigator = useTableNavigator(props.items, fields); return <Table {...props} navigator={navigator} />; -}); +} type TableItem = { id: number | string }; diff --git a/upcoming-release-notes/2277.md b/upcoming-release-notes/2277.md new file mode 100644 index 000000000..9cd912ce5 --- /dev/null +++ b/upcoming-release-notes/2277.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [twk3] +--- + +Fix a missing ref param warning for forwardRef -- GitLab