MCPcopy Index your code
hub / github.com/json-editor/json-editor / _supportDragDrop

Method _supportDragDrop

src/editors/array.js:675–690  ·  view source on GitHub ↗
(tab, useTrigger)

Source from the content-addressed store, hash-verified

673 }
674
675 _supportDragDrop (tab, useTrigger) {
676 supportDragDrop(tab, (i, j) => {
677 const rows = this.getValue()
678 const tmp = rows[i]
679 rows.splice(i, 1)
680 rows.splice(j, 0, tmp)
681
682 this.setValue(rows)
683 this.active_tab = this.rows[j].tab
684 this.refreshTabs()
685
686 this.onChange(true)
687
688 this.jsoneditor.trigger('moveRow', this.rows[j])
689 }, { useTrigger })
690 }
691
692 addControls () {
693 this.collapsed = false

Callers 1

addRowMethod · 0.95

Calls 6

setValueMethod · 0.95
refreshTabsMethod · 0.95
supportDragDropFunction · 0.85
triggerMethod · 0.80
getValueMethod · 0.45
onChangeMethod · 0.45

Tested by

no test coverage detected