File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1176,6 +1176,16 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
11761176 ( ) => dashboard ?. containers ?? [ ] ,
11771177 [ dashboard ?. containers ] ,
11781178 ) ;
1179+
1180+ // Valid move targets: sections, groups, and child tabs (not parent tab sets)
1181+ const moveTargetContainers = useMemo (
1182+ ( ) =>
1183+ allContainers . filter (
1184+ c => ! ( c . type === 'tab' && ! c . parentId ) , // exclude parent tab sets
1185+ ) ,
1186+ [ allContainers ] ,
1187+ ) ;
1188+
11791189 const hasContainers = sections . length > 0 ;
11801190 // Keep backward-compatible alias
11811191 const hasSections = hasContainers ;
@@ -1331,7 +1341,7 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
13311341 } ) ;
13321342 }
13331343 } }
1334- containers = { sections }
1344+ containers = { moveTargetContainers }
13351345 onMoveToSection = { containerId =>
13361346 handleMoveTileToSection ( chart . id , containerId )
13371347 }
@@ -1352,7 +1362,7 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
13521362 whereLanguage ,
13531363 onTimeRangeSelect ,
13541364 filterQueries ,
1355- sections ,
1365+ moveTargetContainers ,
13561366 handleMoveTileToSection ,
13571367 selectedTileIds ,
13581368 handleTileSelect ,
@@ -2030,7 +2040,7 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
20302040 }
20312041 >
20322042 < DashboardDndProvider
2033- containers = { sections }
2043+ containers = { moveTargetContainers }
20342044 onMoveTileToSection = { handleMoveTileToSection }
20352045 onReorderSections = { handleReorderSections }
20362046 >
You can’t perform that action at this time.
0 commit comments