0

I've been building a Joomla 4 component, and have been looking to add the drag-and-drop re-ordering functionality. I have been doing this by looking at how the core components achieve it.

I managed to get the functionality working, but for it to work you have to set a value for "data-draggable-group" on each table row. This only works if the value is the same for each row, but it appears that the value itself can be anything.

Most core components set this as <?php echo $item->catid; ?>, except Tags which uses <?php echo $item->parent_id; ?>.

My question is what this data attribute is for, and why the core components are setting it dynamically. What is the best practise here?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.