View source: R/sortable_options.R
| sortable_options | R Documentation | 
Use this function to define the options for sortable_js and rank_list,
which will pass these in turn to the SortableJS JavaScript library.
sortable_options(
  ...,
  swap = NULL,
  multiDrag = NULL,
  group = NULL,
  sort = NULL,
  delay = NULL,
  disabled = NULL,
  animation = NULL,
  handle = NULL,
  filter = NULL,
  draggable = NULL,
  swapThreshold = NULL,
  invertSwap = NULL,
  direction = NULL,
  scrollSensitivity = NULL,
  scrollSpeed = NULL,
  onStart = NULL,
  onEnd = NULL,
  onAdd = NULL,
  onUpdate = NULL,
  onSort = NULL,
  onRemove = NULL,
  onFilter = NULL,
  onMove = NULL,
  onLoad = NULL
)
| ... | other arguments passed onto  | 
| swap | If  | 
| multiDrag | If  | 
| group | To drag elements from one list into another, both lists must
have the same group value. See
Sortable#group-option
for more details. [ | 
| sort | Boolean that allows sorting inside a list. [ | 
| delay | Time in milliseconds to define when the sorting should start.
[ | 
| disabled | Boolean that disables the  | 
| animation | Millisecond duration of the animation of items when sorting
[ | 
| handle | CSS selector used for the drag handle selector within list
items. [ | 
| filter | CSS selector or JS function used for elements that cannot be
dragged. [ | 
| draggable | CSS selector of which items inside the element should be
draggable. [ | 
| swapThreshold | Percentage of the target that the swap zone will take
up, as a number between  | 
| invertSwap | Set to  | 
| direction | Direction of  | 
| scrollSensitivity | Number of pixels the mouse needs to be to an edge to
start scrolling. [ | 
| scrollSpeed | Number of pixels for the speed of scrolling. [ | 
| onStart,onEnd | JS function called when an element dragging starts or ends | 
| onAdd | JS function called when an element is dropped into the list from another list | 
| onUpdate | JS function called when the sorting is changed within a list | 
| onSort | JS function called by any change to the list (add / update / remove) | 
| onRemove | JS function called when an element is removed from the list into another list | 
| onFilter | JS function called when an attempt is made to drag a filtered element | 
| onMove | JS function called when an item is moved in a list or between lists | 
| onLoad | JS function dispatched on the "next tick" after SortableJS has initialized | 
Many of the SortableJS options will accept a JavaScript function. You can
do this using the htmlwidgets::JS function.
A list with class sortable_options
https://github.com/sortablejs/Sortable/
sortable_js
sortable_options(sort = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.