Options

Options
Name Type Role Default value
actions object A list of functions to be invoked at certain points (more info) {}
data array An array of objects to render a data-driven list
el string / DOM element Targets the list element or the wrapper for it and can be one of the following:
  • CSS selector of a data-driven list wrapper element e.g. #list-wrapper
  • CSS selector of a server rendered list e.g. #list or .list
  • DOM element of a server rendered list (suitable for multiple server rendered instances on the same page)
init boolean Determines if the drag and drop functionality should be enabled after rendering the list. If set to false you'll need to invoke the init() method to enable the drag and drop true
listClassNames string / array A white-space separated string or array of class names to be added to the list elements (more info) nested-sort
listItemClassNames string / array A white-space separated string or array of class names to be added to the list item elements (more info)
propertyMap object Maps the sorted list item properties (more info) {}
nestingLevels number Determines the maximum depth of nesting. Any negative value means infinite levels of nesting. -1
renderListItem function This is a hook to control how data-driven list items render. It receives 2 arguments:
  1. el: the default list item element created by the library
  2. item: the representative data item