I have component
manifest.addComponent({
name: 'MyComponentWithPlaceholder',
icon: SitecoreIcon.DocumentTag,
fields: [
{ name: 'heading', type: CommonFieldTypes.SingleLineText },
],
placeholders: ['my-placeholder']
});
with implementation
const MyComponentWithPlaceholder = (props) => (
<div>
<p>My component with <strong>Placeholder</strong></p>
<Text field={props.fields.heading} />
<Placeholder name='my-placeholder' rendering={props.rendering} />
</div>
);
and my-placeholder
field Allowed Controls filled with some components...
But, when I'm trying to add this component to layout in experience editor, inner placeholder my-placeholder
is behaving like it did not contain any allowed controls.
However, after saving state of layout (in experience editor), my-placeholder
let me correctly select component, that I'm allowed to add to parent component.
What I'm doing wrong? I don't want to save layout state after every added component.