payload 0.19.0 → 0.19.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
+ ## [0.19.1](https://github.com/payloadcms/payload/compare/v0.19.0...v0.19.1) (2022-07-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * ensures duplicative relationship options are not present ([#732](https://github.com/payloadcms/payload/issues/732)) ([ce1c99b](https://github.com/payloadcms/payload/commit/ce1c99b01c0b615401d618bd1894450114cc1f4c))
7
+
1
8
  # [0.19.0](https://github.com/payloadcms/payload/compare/v0.18.5...v0.19.0) (2022-07-08)
2
9
 
10
+ ### BREAKING CHANGES
11
+
12
+ * relationship fields with access control preventing read of relation will return id instead of null ([#644](https://github.com/payloadcms/payload/pull/644))
13
+
3
14
 
4
15
  ### Bug Fixes
5
16
 
@@ -14,8 +25,8 @@
14
25
 
15
26
  * allow clearing DatePicker value ([#641](https://github.com/payloadcms/payload/issues/641)) ([9fd171b](https://github.com/payloadcms/payload/commit/9fd171b26db5e3aaa6ade706f02c9697e1d785f3))
16
27
  * File argument in create/update operation ([#708](https://github.com/payloadcms/payload/issues/708)) ([f3b7dcf](https://github.com/payloadcms/payload/commit/f3b7dcff57961e0c6a5b1536de23b7fe6fa035cf))
17
- * graphql schema output ([#730](https://github.com/payloadcms/payload/issues/730)) ([ad43cbc](https://github.com/payloadcms/payload/commit/ad43cbc808572f15157e4e52d211253c63012d7f))
18
-
28
+ * graphql schema output ([#730](https://github.com/payloadcms/payload/issues/730)) ([ad43cbc](https://github.com/payloadcms/payload/commit/ad43cbc808572f15157e4e52d211253c63012d7f))
29
+
19
30
  ## [0.18.5](https://github.com/payloadcms/payload/compare/v0.18.4...v0.18.5) (2022-06-29)
20
31
 
21
32
 
@@ -41,11 +41,16 @@ const optionsReducer = (state, action) => {
41
41
  ];
42
42
  }
43
43
  return docs;
44
- }, ids.map((id) => ({
45
- label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
46
- value: id,
47
- }))),
44
+ }, []),
48
45
  ];
46
+ ids.forEach((id) => {
47
+ if (!loadedIDs.includes(id)) {
48
+ options.push({
49
+ label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
50
+ value: id,
51
+ });
52
+ }
53
+ });
49
54
  return sort ? sortOptions(options) : options;
50
55
  }
51
56
  const newOptions = [...state];
@@ -63,13 +68,15 @@ const optionsReducer = (state, action) => {
63
68
  ];
64
69
  }
65
70
  return docs;
66
- }, [
67
- ...ids.map((id) => ({
68
- label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
69
- value: id,
70
- relationTo: relation,
71
- })),
72
- ]);
71
+ }, []);
72
+ ids.forEach((id) => {
73
+ if (!loadedIDs.includes(id)) {
74
+ newSubOptions.push({
75
+ label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
76
+ value: id,
77
+ });
78
+ }
79
+ });
73
80
  if (optionsToAddTo) {
74
81
  const subOptions = [
75
82
  ...optionsToAddTo.options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Node, React and MongoDB Headless CMS and Application Framework",
5
5
  "license": "MIT",
6
6
  "author": {