15
Views
2
Comments
[Table Enhanced] Prevent certain rows from being draggable
table-enhanced
Reactive icon
Forge asset by Izam Basiron
Application Type
Reactive

Is there a way to prevent certain rows from being re-orderable? E.g. The first item in my list should always be the first item in the list and the user should not have the option to drag it.

I handle it in my code currently in the on_drop handler, but it would be great if the user didn't even have to option to "accidentally" drag the row.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Hanno ,

you could experiment with pointer-events.

for example, to avoid the first row being dragged, but still allow a link that is inside that row, it would be something like 

.table .table-row:first-child{
    pointer-events: none;
}
.table .table-row:first-child a{
    pointer-events: all;
}

Dorine

2025-09-25 22-50-38
Hanno

Thank you, Dorine.

I will give it a try and report back :)

Hanno

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.