jansule commented on code in PR #39760:
URL: https://github.com/apache/superset/pull/39760#discussion_r4400966450


##########
superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx:
##########
@@ -81,7 +104,85 @@ export const StyledLayerTreeItem = styled(LayerTreeItem)`
   `}
 `;
 
-// forwardRef is needed here in order for emotion and antd tree to work 
properly
+interface DraggableLayerTreeItemProps {
+  layerConf: LayerConfWithId;
+  index: number;
+  draggable?: boolean;
+  onEditLayer: (layerConf: LayerConfWithId, idx: number) => void;
+  onRemoveLayer: (idx: number) => void;
+  onMoveLayerByIndex: (dragIndex: number, hoverIndex: number) => void;
+}
+
+const DraggableLayerTreeItem: FC<DraggableLayerTreeItemProps> = ({
+  layerConf,
+  index,
+  draggable = false,
+  onEditLayer,
+  onRemoveLayer,
+  onMoveLayerByIndex,
+}) => {
+  const ref = useRef<HTMLDivElement>(null);
+
+  const [, drag] = useDrag<DragItem, void, unknown>({

Review Comment:
   Adjusted the tests in 
https://github.com/apache/superset/pull/39760/commits/4a188a01d4dc9def94d602b8aff57cfa85666452



-- 
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