@contentful/field-editor-reference 5.4.0 → 5.5.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.5.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@5.4.0...@contentful/field-editor-reference@5.5.0) (2022-11-04)
7
+
8
+ ### Features
9
+
10
+ - expose sorting end multiple ref field ([#1272](https://github.com/contentful/field-editors/issues/1272)) ([8ad297f](https://github.com/contentful/field-editors/commit/8ad297fc88feebcd07347671bac1497c43c3f3c4))
11
+
6
12
  # [5.4.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@5.3.3...@contentful/field-editor-reference@5.4.0) (2022-11-02)
7
13
 
8
14
  ### Features
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { SortEndHandler } from 'react-sortable-hoc';
2
3
  import { FieldConnector } from '@contentful/field-editor-shared';
3
4
  import type { LinkActionsProps } from '../components';
4
5
  import { Action, ActionLabels, FieldExtensionSDK, ViewType } from '../types';
@@ -29,6 +30,9 @@ export interface ReferenceEditorProps {
29
30
  updateBeforeSortStart?: ({ index }: {
30
31
  index: number;
31
32
  }) => void;
33
+ onSortingEnd?: (({ index }: {
34
+ index: number;
35
+ }) => void) & SortEndHandler;
32
36
  }
33
37
  export declare type CustomActionProps = LinkActionsProps;
34
38
  export declare function ReferenceEditor<T>(props: ReferenceEditorProps & {
@@ -3419,7 +3419,8 @@ function MultipleEntryReferenceEditor(props) {
3419
3419
  return React.createElement(SortableLinkList, _extends({}, childrenProps, {
3420
3420
  axis: "y",
3421
3421
  useDragHandle: true,
3422
- updateBeforeSortStart: updateBeforeSortStart
3422
+ updateBeforeSortStart: updateBeforeSortStart,
3423
+ onSortEnd: props.onSortingEnd
3423
3424
  }), function (_ref2) {
3424
3425
  var items = _ref2.items,
3425
3426
  item = _ref2.item,