How to use the dnd-core.createDragDropManager function in dnd-core

To help you get started, we’ve selected a few dnd-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-dnd / react-dnd / packages / core / react-dnd / src / __tests__ / DndProvider.tsx View on Github external
it('reuses DragDropManager provided to it', () => {
		let capturedManager
		const manager = createDragDropManager(TestBackend, {}, {})

		const ManagerCapture = () => (
			
				
					{({ dragDropManager }) => {
						capturedManager = dragDropManager
						return null
					}}
				
			
		)

		TestUtils.renderIntoDocument()
		expect(capturedManager).toBe(manager)
	})
})
github react-dnd / react-dnd / packages / react-dnd / src / __tests__ / DndProvider.tsx View on Github external
it('reuses DragDropManager provided to it', () => {
		let capturedManager
		const manager = createDragDropManager(TestBackend, {})

		const ManagerCapture = () => (
			
				
					{({ dragDropManager }) => {
						capturedManager = dragDropManager
						return null
					}}
				
			
		)

		TestUtils.renderIntoDocument()
		expect(capturedManager).toBe(manager)
	})
})
github react-dnd / react-dnd / packages / react-dnd / src / common / DndContext.ts View on Github external
export function createDndContext(
	backend: BackendFactory,
	context?: BackendContext,
	debugMode?: boolean,
) {
	return {
		dragDropManager: createDragDropManager(backend, context, debugMode),
	}
}
github cormacrelf / angular-skyhook / packages / core / src / dnd.module.ts View on Github external
return zone.runOutsideAngular(() =>
        createDragDropManager(backendFactory, context, backendOptions, debugMode)
    );
github react-dnd / react-dnd / packages / core / react-dnd / src / common / DndContext.ts View on Github external
export function createDndContext(
	backend: BackendFactory,
	context?: BackendContext,
	options?: BackendOptions,
	debugMode?: boolean,
) {
	return {
		dragDropManager: createDragDropManager(
			backend,
			context,
			options,
			debugMode,
		),
	}
}

dnd-core

Drag and drop sans the GUI

MIT
Latest version published 3 years ago

Package Health Score

91 / 100
Full package analysis