mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 15:32:42 +00:00
fix: display nested components in edit view (#19160)
* add nested component in getstarted dz * fix: display nested components in edit view * chore: add comment
This commit is contained in:
parent
f6ae15bd8b
commit
25d2a8ffa1
@ -89,7 +89,7 @@
|
||||
},
|
||||
"dynamiczone": {
|
||||
"type": "dynamiczone",
|
||||
"components": ["basic.simple", "blog.test-como"]
|
||||
"components": ["basic.simple", "blog.test-como", "default.closingperiod"]
|
||||
},
|
||||
"one_way_tag": {
|
||||
"type": "relation",
|
||||
|
||||
@ -7,7 +7,7 @@ import {
|
||||
useCMEditViewDataManager,
|
||||
} from '@strapi/helper-plugin';
|
||||
import { Trash } from '@strapi/icons';
|
||||
import size from 'lodash/size';
|
||||
import { get, size } from 'lodash/fp';
|
||||
import { useIntl } from 'react-intl';
|
||||
import styled from 'styled-components';
|
||||
|
||||
@ -67,7 +67,8 @@ const FieldComponent = ({
|
||||
|
||||
const allowedFields = isCreatingEntry ? createActionAllowedFields : updateActionAllowedFields;
|
||||
|
||||
const componentValue = modifiedData[name] ?? null;
|
||||
// Use lodash get since the name can be a nested path (e.g. "component.1.component")
|
||||
const componentValue = get(name, modifiedData) ?? null;
|
||||
const compoName = getFieldName(name);
|
||||
|
||||
const hasChildrenAllowedFields = React.useMemo(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user