From 140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 22 Dec 2021 14:18:50 -0500 Subject: [PATCH 1/2] fix: ensures getDataByPath works --- .../CustomComponents/components/fields/Text/Field/index.tsx | 1 + nodemon.json | 3 ++- src/admin/components/forms/Form/getDataByPath.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/demo/collections/CustomComponents/components/fields/Text/Field/index.tsx b/demo/collections/CustomComponents/components/fields/Text/Field/index.tsx index 5ff2865517..05832c64c1 100644 --- a/demo/collections/CustomComponents/components/fields/Text/Field/index.tsx +++ b/demo/collections/CustomComponents/components/fields/Text/Field/index.tsx @@ -31,6 +31,7 @@ const Text: React.FC = (props) => { return ( { const name = path.split('.').pop(); const data = Object.keys(fields).reduce((matchedData, key) => { - if (key.indexOf(`${path}.`) === 0) { + if (key.indexOf(`${path}.`) === 0 || key === path) { return { ...matchedData, [key.replace(pathPrefixToRemove, '')]: fields[key], From 5eb03b675e7c90680d625e56dea964c1660b9233 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 22 Dec 2021 14:21:02 -0500 Subject: [PATCH 2/2] chore: beta --- CHANGELOG.md | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c58e74e5..b6b5dda058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [0.13.10-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.10-beta.0) (2021-12-21) +## [0.13.11-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.11-beta.0) (2021-12-22) ### Bug Fixes @@ -6,6 +6,7 @@ * [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418)) * [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0)) * [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5)) +* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4)) ### Features diff --git a/package.json b/package.json index f48000f2f3..f09dbafb64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "payload", - "version": "0.13.10-beta.0", + "version": "0.13.11-beta.0", "description": "Node, React and MongoDB Headless CMS and Application Framework", "license": "SEE LICENSE IN license.md", "author": {