@@ -8,6 +8,7 @@ import ResizeHandleSVG from './resize-handle.svg';
88import { widgetMappingAtom } from '../../state/widgetMappingAtom' ;
99import { layoutVariantAtom } from '../../state/layoutAtom' ;
1010import { templateAtom , templateIdAtom } from '../../state/templateAtom' ;
11+ import { currentDropInItemAtom } from '../../state/currentDropInItemAtom' ;
1112import DebouncePromise from 'awesome-debounce-promise' ;
1213import {
1314 LayoutTypes ,
@@ -59,8 +60,8 @@ const debouncedPatchDashboardTemplate = DebouncePromise(patchDashboardTemplate,
5960 onlyResolvesLast : true ,
6061} ) ;
6162
62- const getResizeHandle = ( resizeHandleAxis : string , ref : React . Ref < HTMLElement > ) => (
63- < div ref = { ref as React . Ref < HTMLDivElement > } className = { `react-resizable-handle react-resizable-handle-${ resizeHandleAxis } ` } >
63+ const getResizeHandle = ( resizeHandleAxis : string , ref : React . Ref < HTMLDivElement > ) => (
64+ < div ref = { ref } className = { `react-resizable-handle react-resizable-handle-${ resizeHandleAxis } ` } >
6465 < img src = { ResizeHandleSVG } alt = "" aria-hidden = "true" />
6566 </ div >
6667) ;
@@ -76,6 +77,7 @@ const GridLayout = ({ isLayoutLocked = false, layoutType = 'landingPage' }: { is
7677 const addNotification = useAddNotification ( ) ;
7778 const setCurrentlyUsedWidgets = useSetAtom ( currentlyUsedWidgetsAtom ) ;
7879 const setDrawerExpanded = useSetAtom ( drawerExpandedAtom ) ;
80+ const currentDropInItem = useAtomValue ( currentDropInItemAtom ) ;
7981 const { analytics } = useChrome ( ) ;
8082
8183 // Convert Scalprum mapping to PatternFly mapping
@@ -199,6 +201,7 @@ const GridLayout = ({ isLayoutLocked = false, layoutType = 'landingPage' }: { is
199201 showEmptyState = { ! isLoaded }
200202 onDrawerExpandChange = { handleDrawerExpandChange }
201203 onActiveWidgetsChange = { handleActiveWidgetsChange }
204+ droppingWidgetType = { currentDropInItem }
202205 />
203206 ) }
204207 </ div >
0 commit comments