Topic: Sortable is not defined

Espen Rønning priority asked 3 years ago

Expected behavior const instanceSortable = Sortable.getInstance(sortableElement); This should get the sortable instance of the element sortableElement

Actual behavior Javascript error: Sortable is not defined

Resources (screenshots, code snippets etc.)

The snippet is built from Drag & Drop API documentation:

Michał Duszak staff answered 3 years ago

Thank you for your feedback. I see this option is not working properly. I am currently working on locating the problem, and fixing it as fast as we can.

Espen Rønning priority answered 3 years ago


Next question - how to update the list of sortable elements? Nothing happens when you press Add Element (exept for the alert message).

Michał Duszak staff answered 3 years ago

Now it's correct and working. Sortable element didn't have an ID, and I had to look in the DragAndDrop module to get Sortable


<div id="sortable" data-mdb-sortable="sortable">


const instanceSortable = DragAndDrop.Sortable.getInstance(sortableElement);

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.5.0
  • Device: PC
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes