Skip to content

Commit

Permalink
fix: drag bug
Browse files Browse the repository at this point in the history
  • Loading branch information
苏文雄 committed Oct 27, 2019
1 parent 85abb37 commit 5dab2ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export default class JsonSchemaForm extends React.PureComponent {
this.changeStore(store=>{
const arr = getData(this.state.store.value, paths);
const newArr = arrMove(arr, from ,to)
if(paths.length === 0){
return store.value = newArr;
}
setData(store.value, paths, newArr)
})
}
Expand Down

0 comments on commit 5dab2ec

Please sign in to comment.