refactor(wrapNode): clean up event handlers closes #482

This commit is contained in:
moklick
2020-09-10 17:56:36 +02:00
parent ae91e84f67
commit 0cc9526630
2 changed files with 107 additions and 207 deletions
-2
View File
@@ -1,8 +1,6 @@
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);