components
components copied to clipboard
drag-drop: move table cell content to other cells
Bug, feature request, or proposal:
Feature Request/bug(?)
What is the expected behavior?
Easily setup a table with cdk/drag-drop
What is the current behavior?
I couldn't setup it at all. But I'm not sure I'm doing it right: I've just followed the .md
file example with a regular HTML table. I could move a table cell content to another table cell, but once I do that, I cannot drag the target cell content to the former cell, for example. It seems a little bit unstable.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-drag-and-drop-table?file=app%2Fcdk-drag-drop-axis-lock-example.html
What is the use-case or motivation for changing an existing behavior?
Drag-and-drop table cells content
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
7.0.0-beta.0
Is there anything else we should know?
cc: @crisbeto
Can we use cdkDrag and drop to drag cell in that particular column.
Like in my table :-
I want to move mybid against 700.05 and move it to 700.15.
I can not do it till now. Does anyone has any idea how to do it.
Man.... you'll be a happier person if you step back from using tables and do it tableless. By looking at the image I cannot figure out the reason that led you to choose tables in the first place (a11y)? That's not impossible to do it with a table, but in order to introduce cdkDrag to your template, you'll have to sacrifice its code readability (maybe you'd have to put a div inside each cell to work as a container?).
Anyway, https://stackoverflow.com is the right place to get help on how to do something. This channel is exclusive for reporting bugs or suggesting features.
Actually it was not earlier expected to be drag able. That came out later. Trust me this is pain in A**.
Can we use cdkDrag and drop to drag cell in that particular column. Like in my table :-
I want to move mybid against 700.05 and move it to 700.15.
I can not do it till now. Does anyone has any idea how to do it.
- Place DIVs into each cell.
- Make Each div a DropList and Link all required DropLists.
- Then, each Draggable item can be Marked with CdkDrag and you can drag them across to the Droplists/Cells.