diff --git a/demo/collections/CustomComponents/components/fields/Text/Field/index.tsx b/demo/collections/CustomComponents/components/fields/Text/Field/index.tsx index 5ff286551..05832c64c 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],