greggailly commented on code in PR #42483:
URL: https://github.com/apache/superset/pull/42483#discussion_r3844877975
##########
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 additions: string[] = [];
+ items.forEach(item => {
+ if (item.type === DndItemType.Column) {
+ additions.push((item.value as ColumnMeta).column_name);
+ } else if (item.type === DndItemType.Metric) {
+ additions.push((item.value as Metric).metric_name);
+ }
+ });
+ if (additions.length === 0) {
+ return;
+ }
+ onChange(multi ? [...coercedValue, ...additions] : additions[0]);
Review Comment:
Done. Added a Set to prevent this from happening
<img width="626" height="1084" alt="Screen Recording 2026-08-24 at 17 11 21"
src="https://github.com/user-attachments/assets/860e5393-ca0b-420f-b59e-0254df92cc0e"
/>
--
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]