MCPcopy Create free account
hub / github.com/decaporg/decap-cms / arrayMove

Function arrayMove

packages/decap-cms-widget-relation/src/RelationControl.js:30–34  ·  view source on GitHub ↗
(array, from, to)

Source from the content-addressed store, hash-verified

28import relationCache from './RelationCache';
29
30function arrayMove(array, from, to) {
31 const slicedArray = array.slice();
32 slicedArray.splice(to < 0 ? array.length + to : to, 0, slicedArray.splice(from, 1)[0]);
33 return slicedArray;
34}
35
36function MultiValue(props) {
37 const { setNodeRef, transform, transition } = useSortable({

Callers 2

withFileControl.jsFile · 0.85
RelationControlClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected