mirror of
https://github.com/apache/superset.git
synced 2026-06-01 21:59:26 +00:00
feat(explore): each control can define its own canDrop for dnd (#16090)
* feat(explore): each control can define its own canDrop for dnd * Make canDropValue optional * Add onDropValue
This commit is contained in:
committed by
GitHub
parent
a70248736f
commit
6e1d16d956
@@ -40,9 +40,11 @@ export default function DndSelectLabel<T, O>({
|
||||
|
||||
drop: (item: DatasourcePanelDndItem) => {
|
||||
props.onDrop(item);
|
||||
props.onDropValue?.(item.value);
|
||||
},
|
||||
|
||||
canDrop: (item: DatasourcePanelDndItem) => props.canDrop(item),
|
||||
canDrop: (item: DatasourcePanelDndItem) =>
|
||||
props.canDrop(item) && (props.canDropValue?.(item.value) ?? true),
|
||||
|
||||
collect: monitor => ({
|
||||
isOver: monitor.isOver(),
|
||||
|
||||
Reference in New Issue
Block a user