mc_bronx priority asked 5 months ago


I'm trying to figure out the plugin

https://mdbootstrap.com/docs/standard/plugins/drag-and-drop/#docsTabsOverview

  1. In the examples the object is used DragAndDrop But I get an error "Uncaught ReferenceError: DragAndDrop is not defined".

I connect it according to the instructions import { Draggable, Sortable } from '.... but even here there is no DragAndDrop

Sorting itself visually works.

Questions: 1. How to deal with DragAndDrop so that the examples would work from the instructions? 2. How to get the whole list of sorted objects to send in the form Post.


Kamila Pieńkowska staff answered 5 months ago


Here is instruction for importing plugins: https://mdbootstrap.com/docs/standard/pro/plugins-installation/

If you do Manual Import (1 type) you can use examples from documentation the way they are.

If you are doing imports the way you do now you need to add:

window.Draggable = Draggable
window.Sortable = Sortable

and skip DragAndDrop from JS code in examples since you've imported directly its children: Sortable and Draggable.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.2
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: Yes