Dashboard: Fix dropping panels in tabs and rows (#114893)
This commit is contained in:
@@ -13,6 +13,7 @@ import { isRepeatCloneOrChildOf } from '../../utils/clone';
|
||||
import { useDashboardState, useInterpolatedTitle } from '../../utils/utils';
|
||||
import { DashboardScene } from '../DashboardScene';
|
||||
import { useSoloPanelContext } from '../SoloPanelContext';
|
||||
import { isDashboardLayoutGrid } from '../types/DashboardLayoutGrid';
|
||||
|
||||
import { RowItem } from './RowItem';
|
||||
|
||||
@@ -83,7 +84,7 @@ export function RowItemRenderer({ model }: SceneComponentProps<RowItem>) {
|
||||
dragProvided.innerRef(ref);
|
||||
model.containerRef.current = ref;
|
||||
}}
|
||||
data-dashboard-drop-target-key={model.state.key}
|
||||
data-dashboard-drop-target-key={isDashboardLayoutGrid(layout) ? model.state.key : undefined}
|
||||
className={cx(
|
||||
styles.wrapper,
|
||||
!isCollapsed && styles.wrapperNotCollapsed,
|
||||
|
||||
@@ -11,6 +11,7 @@ import { useIsConditionallyHidden } from '../../conditional-rendering/hooks/useI
|
||||
import { isRepeatCloneOrChildOf } from '../../utils/clone';
|
||||
import { useDashboardState } from '../../utils/utils';
|
||||
import { useSoloPanelContext } from '../SoloPanelContext';
|
||||
import { isDashboardLayoutGrid } from '../types/DashboardLayoutGrid';
|
||||
|
||||
import { TabItem } from './TabItem';
|
||||
|
||||
@@ -91,7 +92,7 @@ export function TabItemRenderer({ model }: SceneComponentProps<TabItem>) {
|
||||
onSelect?.(evt);
|
||||
}}
|
||||
label={titleInterpolated}
|
||||
data-dashboard-drop-target-key={model.state.key}
|
||||
data-dashboard-drop-target-key={isDashboardLayoutGrid(layout) ? model.state.key : undefined}
|
||||
{...titleCollisionProps}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user