Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

MudTable make table rows draggable

$
0
0

I want to create draggable table rows with MudTable. To be able to set the draggable attribute on a tr element, I used the ChildRowContent and left the RowTemplate empty, since RowTemplate will generate the tr element automatically having no ability to set attributes like draggable.

<ChildRowContent><MudTr draggable="true"                ondragover="event.preventDefault();"                ondragstart="event.dataTransfer.setData('', event.target.id);"                @ondrop="HandleDrop"                @ondragenter="HandleDragEnter"                @ondragleave="HandleDragLeave"><MudTd>Col</MudTd></MudTr></ChildRowContent>

But unfortunately when I drag a table row It seems to drag the whole table. Is there an easier way to achieve this with MudTable?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>