How to use the react-dnd-html5-backend.getEmptyImage function in react-dnd-html5-backend

To help you get started, we’ve selected a few react-dnd-html5-backend 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 strapi / strapi / packages / strapi-plugin-content-manager / admin / src / components / DraggableAttr / index.js View on Github external
componentDidMount() {
    // Use empty image as a drag preview so browsers don't draw it
    // and we can draw whatever we want on the custom drag layer instead.
    this.props.connectDragPreview(getEmptyImage(), {
      // IE fallback: specify that we'd rather screenshot the node
      // when it already knows it's being dragged so we can hide it with CSS.
      // Removginv the fallabck makes it handle variable height elements
      // captureDraggingState: true,
    });
  }
github nikhilbaradwaj / ReactMultiDnD / src / Item.js View on Github external
componentDidMount() {
    // Use empty image as a drag preview so browsers don't draw it
    // and we can draw whatever we want on the custom drag layer instead.
    this.props.connectDragPreview(getEmptyImage(), {
      // IE fallback: specify that we'd rather screenshot the node
      // when it already knows it's being dragged so we can hide it with CSS.
      captureDraggingState: true,
    });

    this.handleRowSelection = this.handleRowSelection.bind(this);
  }
github hortonworks / streamline / webservice / src / main / resources / app / scripts / libs / react-dnd-nestable / Item.jsx View on Github external
componentDidMount() {
    // use empty image as a drag preview so browsers don't draw it
    // and we can draw whatever we want on the custom drag layer instead.
    this.props.connectDragPreview(getEmptyImage(), {
      // IE fallback: specify that we'd rather screenshot the node
      // when it already knows it's being dragged so we can hide it with CSS.
      captureDraggingState: true
    });
  }
github Flood-UI / flood / client / src / javascript / components / general / SortableListItem.js View on Github external
componentDidMount() {
    // Replace the native drag preview with an empty image.
    this.props.connectDragPreview(getEmptyImage(), {
      captureDraggingState: true,
    });
  }
github codesandbox / codesandbox-client / packages / app / src / app / pages / Dashboard / Content / SandboxCard / index.js View on Github external
componentDidMount() {
    if (this.props.selected) {
      if (
        this.el &&
        typeof this.el.focus === 'function' &&
        !this.props.isScrolling()
      ) {
        this.el.focus();
      }
    }

    const { connectDragPreview } = this.props;
    if (connectDragPreview) {
      // Use empty image as a drag preview so browsers don't draw it
      // and we can draw whatever we want on the custom drag layer instead.
      connectDragPreview(getEmptyImage(), {
        // IE fallback: specify that we'd rather screenshot the node
        // when it already knows it's being dragged so we can hide it with CSS.
        captureDraggingState: true,
      });
    }

    this.checkScreenshot();
  }
github nschuc / keras-ui / src / containers / ShelfLayerContainer.js View on Github external
componentDidMount() {
		this.props.connectDragPreview(getEmptyImage(), {
			captureDraggingState: true
		});
	}
github strapi / strapi / packages / strapi-plugin-content-manager / admin / src / components / FieldsReorder / Item.js View on Github external
useEffect(() => {
    preview(getEmptyImage(), { captureDraggingState: true });
  }, [preview]);
github strapi / strapi / packages / strapi-plugin-content-manager / admin / src / containers / ListSettingsView / Label.js View on Github external
useEffect(() => {
    preview(getEmptyImage(), { captureDraggingState: false });
  }, [preview]);
github ProtoTeam / drag-calendar / src / ui / content / components / dragSourceComponents / event.jsx View on Github external
componentDidMount() {
    this.props.connectDragPreview(getEmptyImage(), { captureDraggingState: true })
  }
github xcv58 / Tab-Manager-v2 / src / js / components / Tab / DraggableTab.tsx View on Github external
useEffect(() => {
    connectDragPreview(getEmptyImage())
  })
  return (

react-dnd-html5-backend

HTML5 backend for React DnD

MIT
Latest version published 2 years ago

Package Health Score

86 / 100
Full package analysis

Similar packages