(from, to)
| 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) => { |
no test coverage detected