@contentful/field-editor-reference 7.0.6 → 7.0.7

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.
@@ -82,7 +82,8 @@ function Editor(props) {
82
82
  const items = _react.useMemo(()=>{
83
83
  return (props.items || []).map((link)=>link || nullableValue);
84
84
  }, [
85
- props.items
85
+ props.items,
86
+ props.items.length
86
87
  ]);
87
88
  const { rearrangeSortIDs } = (0, _useSortIDs.useSortIDs)(items);
88
89
  const onSortStart = (0, _react.useCallback)(()=>{
@@ -72,7 +72,8 @@ const nullableValue = {
72
72
  function ResourceEditor(props) {
73
73
  const { setValue } = props;
74
74
  const items = _react.useMemo(()=>(props.items || []).map((link)=>link || nullableValue), [
75
- props.items
75
+ props.items,
76
+ props.items.length
76
77
  ]);
77
78
  const onSortStart = ()=>(0, _noop.default)();
78
79
  const onSortEnd = (0, _react.useCallback)(({ oldIndex, newIndex })=>{
@@ -32,7 +32,8 @@ function Editor(props) {
32
32
  const items = React.useMemo(()=>{
33
33
  return (props.items || []).map((link)=>link || nullableValue);
34
34
  }, [
35
- props.items
35
+ props.items,
36
+ props.items.length
36
37
  ]);
37
38
  const { rearrangeSortIDs } = useSortIDs(items);
38
39
  const onSortStart = useCallback(()=>{
@@ -17,7 +17,8 @@ const nullableValue = {
17
17
  function ResourceEditor(props) {
18
18
  const { setValue } = props;
19
19
  const items = React.useMemo(()=>(props.items || []).map((link)=>link || nullableValue), [
20
- props.items
20
+ props.items,
21
+ props.items.length
21
22
  ]);
22
23
  const onSortStart = ()=>noop();
23
24
  const onSortEnd = useCallback(({ oldIndex, newIndex })=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-reference",
3
- "version": "7.0.6",
3
+ "version": "7.0.7",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "registry": "https://npm.pkg.github.com/"
71
71
  },
72
- "gitHead": "b4833085fd4ade2941f02110e34511a35634197a"
72
+ "gitHead": "8f24b353fae5d87df0dc86772fba622a1d6abc07"
73
73
  }