Fluentui: Dragged Row appears on top when dropping on itself

Created on 10 Jun 2019  路  3Comments  路  Source: microsoft/fluentui

Bug Report

Example on page https://developer.microsoft.com/en-us/fabric/#/controls/web/detailslist/draganddrop has issue when dropping the row on itself

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? Don't know how to submit.

Requested priority: Low

Products/sites affected: https://developer.microsoft.com/en-us/fabric/#/controls/web/detailslist/draganddrop

Describe the issue:

Drag and drop example in DetailsList emits incorrect behaviour when dropping the row same place.

Actual behavior:

It inserts the row at top of DetailsList

Expected behavior:

It should not change the order

If applicable, please provide a codepen repro:

Code change:

onDrop: (item?: any, event?: DragEvent) => { 
        if (this._draggedItem && this._draggedItem !== item) {
          this._insertBeforeItem(item);
        }
      }

https://codepen.io/anon/pen/ewOMwN?editors=0010

DetailsList Backlog review Type

All 3 comments

Nice find @vcgupta and thanks for bringing this to my attention @natalieethell!

Are you willing to submit a PR to fix? Don't know how to submit.

@vcgupta, to contribute a fix (if you're willing) you'll need to fork the repo and create a pull-request. There are some detailed instructions here: https://github.com/OfficeDev/office-ui-fabric-react/wiki/Contributing.

The team would be overjoyed to review and merge a contribution fixing this bug!

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React!

I think we should keep this issue open as it seems like a legitimate bug. Adding backlog tag for now. @vcgupta you are welcome to raise a PR in the meantime.

Was this page helpful?
0 / 5 - 0 ratings