bito-code-review[bot] commented on PR #42483:
URL: https://github.com/apache/superset/pull/42483#issuecomment-5093020946

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of `canDrop` in 
`DndSelectLabel.tsx` performs a type check against `acceptTypes` before 
evaluating the folder's contents, causing folder drops to be rejected if the 
drop zone does not explicitly accept the `Folder` type. 
   
   To resolve this, the logic should be updated to evaluate the folder's child 
items when the active item type is `Folder`, allowing the drop if at least one 
child item is valid for the drop zone. The provided diff already includes this 
fix, which correctly checks `activeData.items` and validates them against 
`acceptTypes` and `dropValidator`.
   
   
**superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx**
   ```
   if (activeData.type === DndItemType.Folder) {
         const items = Array.isArray(activeData.items) ? activeData.items : [];
         return items.some(
           item =>
             acceptTypes.includes(item.type as DndItemType) && 
dropValidator(item),
         );
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to