Skip to content

DnD: dragging is disabled if resizing is not allowed #1072

Description

@xtursky

Do you want to request a feature or report a bug?

bug

What's the current behavior?

I cannot enable drag&drop without resizable functionality.
If event is draggable or not is incorrectly decided only by evaluating whether resizing is allowed or not.
So if I set draggableAccesor to true and resizableAccessor to false it won't work.

https://github.com/intljusticemission/react-big-calendar/blob/master/src/addons/dragAndDrop/EventWrapper.js#L118

What's the expected behavior?

To check if either isDraggable or isResizable and later add corresponding props based on these settings.

Change check to

if (isResizable || isDraggable) {

And add anchors only if

      if (isResizable) {
        // replace original event child with anchor-embellished child
        newProps.children = (
          <div className="rbc-addons-dnd-resizable">
            {StartAnchor}
            {children.props.children}
            {EndAnchor}
          </div>
        );
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions