greggailly commented on code in PR #42483:
URL: https://github.com/apache/superset/pull/42483#discussion_r3689308901
##########
superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx:
##########
@@ -385,6 +413,26 @@ const DndMetricSelect = (props: any) => {
[onNewMetric, togglePopover],
);
+ const onDropFolder = useCallback(
+ (items: DatasourcePanelDndItem[]) => {
+ // Items already passed `canDrop`. Saved metrics are added as-is; columns
+ // become adhoc metrics with a default aggregation (no popover, since a
+ // folder can drop many at once).
+ const additions = items.map(item =>
+ item.type === DndItemType.Metric
+ ? (item.value as Metric)
+ : createAdhocMetricFromColumn(item.value as ColumnMeta),
+ );
Review Comment:
added this case + test
--
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]