Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap.m.Table ListMode Delete for table cannot be used in drag and drop because selection of a row is not permitted #4044

Open
albertbolt1 opened this issue May 7, 2024 · 2 comments

Comments

@albertbolt1
Copy link

albertbolt1 commented May 7, 2024

OpenUI5 version: 1.123

Browser/version (+device/version): chrome latest

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible):
https://openui5.hana.ondemand.com/entity/sap.m.Table/sample/sap.m.sample.TableDnD/code

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. https://openui5.hana.ondemand.com/entity/sap.m.Table/sample/sap.m.sample.TableDnD/code
  2. Change the mode of tables to Delete
  3. Select the row in table and try to move it up and down
  4. It doesn't happen because rows cannot be selected during the delete mode

What is the expected result?
Expected result is that there should be a way to select the rows in the delete mode so that we can move the rows in the delete mode

What happens instead?
If we press the row then it wont get selected so I wont be able to move it up and down. There should be a way to trigger the press event in case we press the row when the table is in delete mode.

Any other information? (attach screenshot if possible)

https://experience.sap.com/fiori-design-web/responsive-table/

I went through this and its suggested that "Delete is a mode of the responsive table and therefore cannot be used together with single selection or multiselection." but what if we want to select the row in the table during delete mode and move it up and down.

@albertbolt1 albertbolt1 changed the title ListMode Delete for table cannot be used in drag and drop because selection of a row is not permitted sap.m.Table ListMode Delete for table cannot be used in drag and drop because selection of a row is not permitted May 7, 2024
@DonkeyCo DonkeyCo self-assigned this May 7, 2024
@DonkeyCo
Copy link
Member

DonkeyCo commented May 7, 2024

I am a bit confused by the problem to be honest.

As I've understood correctly, you're trying use "Delete" in combination with Drag & Drop, right?
When changing the mode of both tables to "Delete", you are still able to press on a row and drag it somewhere else, even though selection is not possible.

If you are solely referencing the buttons ("Move Up", etc.), that logic is completely custom. In this case there is a controller function moveUp and moveDown, which moves the items accordingly.
That logic is not part of the Drag & Drop API.

One could overcome this issue, by also providing another button, which switches Delete mode to selection.

But in the end, that is up to the application itself.

Drag & Drop API works as expected (dragging and dropping works) in combination with Delete. And if you'd want to enable the sample coding with Delete mode, to allow for button usage as well, the custom logic would need a modification.

Or am I missing your point?

@albertbolt1
Copy link
Author

albertbolt1 commented May 8, 2024

@DonkeyCo Hi, You have understood it rightly, The problem is not with the drag and drop, like you said we can have a delete button which switches the delete mode but lets say I want to use "move up" and "move down" when the table is in Delete mode then its not possible because I wont be able to select a row to move it up and down.

Issue: The table is in delete mode and I want to select a row to move it up and down, during delete mode this is not possible, is there a way this can be achieved without switching the mode of the table from delete to single select master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants