feat(nodes): add enter, move, leave and context handler #301

This commit is contained in:
moklick
2020-07-13 16:04:49 +02:00
parent b32d5454e1
commit 32f6101d37
8 changed files with 117 additions and 13 deletions
+2
View File
@@ -1,6 +1,8 @@
import { DraggableEvent } from 'react-draggable';
import { MouseEvent as ReactMouseEvent } from 'react';
export const noop = () => {};
export const isInputDOMNode = (e: ReactMouseEvent | DraggableEvent | KeyboardEvent) => {
const target = e.target as HTMLElement;
return e && target && ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target.nodeName);