Skip to content

Commit

Permalink
fix: array widget sort (#5805)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini authored Feb 27, 2024
1 parent 85e3147 commit 28c3058
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/volto/news/5805.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ArrayWidget sorting items. @giuliaghisini
4 changes: 3 additions & 1 deletion packages/volto/src/components/manage/Widgets/ArrayWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ class ArrayWidget extends Component {
useDragHandle
// react-sortable-hoc props:
axis="xy"
onSortEnd={this.onSortEnd}
onSortEnd={(sortProp) => {
this.onSortEnd(selectedOption, sortProp);
}}
menuShouldScrollIntoView={false}
distance={4}
// small fix for https://github.com/clauderic/react-sortable-hoc/pull/352:
Expand Down

0 comments on commit 28c3058

Please sign in to comment.