fix(core): canDrop check for external (#9058)

This commit is contained in:
pengx17
2024-12-09 10:25:38 +00:00
parent 9365958a02
commit 814b4c9cb0
12 changed files with 141 additions and 55 deletions

View File

@@ -0,0 +1,13 @@
import { createContext } from 'react';
import type { DNDData, ExternalDataAdapter } from './types';
export const DNDContext = createContext<{
/**
* external data adapter.
* if this is provided, the drop target will handle external elements as well.
*
* @default undefined
*/
externalDataAdapter?: ExternalDataAdapter<DNDData>;
}>({});