🐛 Fix a missing ref param warning for forwardRef (#2277)

* Fix a missing ref param warning for forwardRef

- Drop unused usage of forwardRef on TableWithNavigator
This commit is contained in:
DJ Mountney
2024-01-24 11:13:43 -08:00
committed by GitHub
parent 524bd4e9eb
commit 5adb083575
2 changed files with 12 additions and 5 deletions

View File

@@ -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 };

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [twk3]
---
Fix a missing ref param warning for forwardRef