@contentful/field-editor-reference 5.4.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3289,12 +3289,18 @@ function Editor$1(props) {
3289
3289
  }, []);
3290
3290
  var onSortEnd = useCallback(function (_ref) {
3291
3291
  var oldIndex = _ref.oldIndex,
3292
- newIndex = _ref.newIndex;
3292
+ newIndex = _ref.newIndex,
3293
+ collection = _ref.collection;
3293
3294
  var newItems = arrayMove(items, oldIndex, newIndex);
3294
3295
  setValue(newItems);
3295
3296
  setIndexToUpdate && setIndexToUpdate(undefined);
3296
3297
  document.body.classList.remove('grabbing');
3297
- }, [items, setIndexToUpdate, setValue]);
3298
+ props.onSortingEnd && props.onSortingEnd({
3299
+ oldIndex: oldIndex,
3300
+ newIndex: newIndex,
3301
+ collection: collection
3302
+ });
3303
+ }, [items, props, setIndexToUpdate, setValue]);
3298
3304
  var onMove = useCallback(function (oldIndex, newIndex) {
3299
3305
  var newItems = arrayMove(items, oldIndex, newIndex);
3300
3306
  setValue(newItems);