greggailly commented on code in PR #42483:
URL: https://github.com/apache/superset/pull/42483#discussion_r3659420529


##########
superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx:
##########
@@ -257,6 +261,25 @@ function DndColumnMetricSelect(props: 
DndColumnMetricSelectProps) {
     [combinedOptionsMap, coercedValue, isMetricSelected],
   );
 
+  const onDropFolder = useCallback(
+    (items: DatasourcePanelDndItem[]) => {
+      // Items already passed `canDrop` (valid, not already selected).
+      const newValues = [...coercedValue];
+      items.forEach(item => {
+        if (item.type === DndItemType.Column) {
+          newValues.push((item.value as ColumnMeta).column_name);
+        } else if (item.type === DndItemType.Metric) {
+          newValues.push((item.value as Metric).metric_name);
+        }
+      });
+      if (newValues.length === coercedValue.length) {
+        return;
+      }
+      onChange(multi ? newValues : newValues[0]);
+    },
+    [onChange, coercedValue, multi],

Review Comment:
   Fixed



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