From 3d93c0f5780c307067a363661f44c8b763ebe717 Mon Sep 17 00:00:00 2001 From: georgecwan Date: Mon, 23 Oct 2023 13:41:08 -0700 Subject: [PATCH] Update SortableTree types --- .../visibility-ordering-builder/VisibilityOrderingItem.tsx | 7 ++----- .../sortable-tree/SortableTree.tsx | 2 +- .../sortable-tree/SortableTreeInner.tsx | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx index fcd7785c86..2624d08f05 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx @@ -14,10 +14,7 @@ type VisibilityOrderingItemProps = { childCount: number; item: FlattenedIrisGridTreeItem; onVisibilityChange: (modelIndexes: number[], isVisible: boolean) => void; - onClick: ( - name: string, - event: React.MouseEvent - ) => void; + onClick: (name: string, event: React.MouseEvent) => void; onGroupDelete: (group: ColumnHeaderGroup) => void; onGroupColorChange: ( group: ColumnHeaderGroup, @@ -63,7 +60,7 @@ const VisibilityOrderingItem = forwardRef< ); const handleClick = useCallback( - (event: React.MouseEvent) => { + (event: React.MouseEvent) => { onClick(value, event); }, [onClick, value] diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx index 11038dc646..89dff06af9 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx @@ -50,7 +50,7 @@ interface Props { childCount?: number; value: string; item: FlattenedItem; - ref: React.Ref | null; + ref?: React.Ref; handleProps?: Record; }) => JSX.Element; } diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx index c7efb976f6..5b56e606f1 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx @@ -85,7 +85,7 @@ interface Props { childCount?: number; value: string; item: FlattenedItem; - ref: React.Ref | null; + ref?: React.Ref; handleProps?: Record; }) => JSX.Element; activeId: string | null;