ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[Table/Tree]: Cannot drag and drop multiple items at a time

Open Ankitadoshi opened this issue 1 year ago • 7 comments

Bug Description

When we add the movable property to all the items in a Tree or Table component, We see that we can move only one item at a time. We cannot select multiple rows at a time and move them or perform drag&drop on them. We see that in moveOver event - there is only one element passed as source and destination and it does not have provision to pass the selected elements as array.

This is a high priority issue for us since we need to implement the drag and drop feature for our project with multiple rows draggable at the same time.

Image

Please let me know if my understanding is incorrect here. Thanks

Affected Component

SF

Expected Behaviour

User should be able to drag and drop multiple table rows or tree items at the same time.

Isolated Example

https://codesandbox.io/p/sandbox/ui5-wc-table-2-0-drag-and-drop-45zpmv?file=%2Fsrc%2Findex.js&workspaceId=ws_2RkXLtnBTTpaKTpy1jSNog

Steps to Reproduce

  1. Go to link https://codesandbox.io/p/sandbox/ui5-wc-table-2-0-drag-and-drop-45zpmv?file=%2Fsrc%2Findex.js&workspaceId=ws_2RkXLtnBTTpaKTpy1jSNog
  2. Try to drag multiple rows from Table 1 to Table 2 or vice versa
  3. Observe that only one row can be dragged at a time.

...

Log Output, Stack Trace or Screenshots

No response

Priority

High

UI5 Web Components Version

2.6.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SF

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

Ankitadoshi avatar Feb 03 '25 09:02 Ankitadoshi

Hello @ui5-webcomponents-topic-tbl,

Please check if this is a bug or a (most probably) feature request.

Best Regards, Nikolay Hristov

NHristov-sap avatar Feb 03 '25 11:02 NHristov-sap

Hi @simlin,

Drag and Drop feature was requested as part of https://github.com/SAP/ui5-webcomponents-react/issues/6251 and it was added to Web components as part of https://github.com/SAP/ui5-webcomponents/issues/7240 Can you please help check this issue?

Thanks

Ankitadoshi avatar Feb 03 '25 11:02 Ankitadoshi

Hello @Ankitadoshi there is no explicit build-in support for dragging selected items / rows for all the Web Components List, Tree or Table.

I will take this as feature request and start some discussion whether such a bundling of selection and drag & drop is really desired for those controls. It could also be that just some special indication for the drag ghost might be the outcome.

But the functionality can already be implemented by applications with the current drag & drop offering, see https://stackblitz.com/edit/github-ltccua-hcnffz?file=index.html,main.js,package.json

Best Regards Jens

simlin avatar Feb 03 '25 16:02 simlin

Hi @simlin,

I wanted to check with you if there is any way to customize the cursor on drag start. Our requirement is to show a "grabbing" cursor on drag start and when we try to drop it to invalid areas, it should be become "not-allowed" cursor. (first two icons from the image below) Currently i do not see a way to achive this. it always shows the arrow icon with + symbol on drag start and drop

Image

Ankitadoshi avatar Feb 26 '25 05:02 Ankitadoshi

The cusror question will be further handled by https://github.com/SAP/ui5-webcomponents/issues/10960

The remaining missing functionality which is requested here is the possibility to indicate in the drag ghost that multiple items are dragged, e.g. like

Image

simlin avatar Feb 27 '25 09:02 simlin

Internal Reference: BGSOFUIPIRIN-6790

dobrinyonkov avatar Mar 14 '25 08:03 dobrinyonkov

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Aug 13 '25 10:08 github-actions[bot]