MCPcopy
hub / github.com/YMFE/yapi / onChange

Method onChange

client/components/EasyDragSort/EasyDragSort.js:39–51  ·  view source on GitHub ↗
(from, to)

Source from the content-addressed store, hash-verified

37 const { onlyChild } = props;
38 let container = props.children;
39 const onChange = (from, to) => {
40 if (from === to) {
41 return;
42 }
43 let curValue;
44
45 curValue = props.data();
46
47 let newValue = arrMove(curValue, from, to);
48 if (typeof props.onChange === 'function') {
49 return props.onChange(newValue, from, to);
50 }
51 };
52 return (
53 <div>
54 {container.map((item, index) => {

Callers 9

xFunction · 0.80
tFunction · 0.80
LFunction · 0.80
FFunction · 0.80
kFunction · 0.80
DFunction · 0.80
oFunction · 0.80

Calls 1

arrMoveFunction · 0.85

Tested by

no test coverage detected