What are you trying to do?
Limit the ability to add child components to those in an expected/allowed list using the allowedComponents parameter as per Code components API reference | Learn Plasmic
Issue being seen
The rules are enforced with a toast error when adding a new component not in the allowedComponents list via the add menu (+ button) with either the Slot: “children” item in the tree selected or the component label itself selected (in my demo case ui/select).
The rules are enforced with an error when dragging a new component not in the allowedComponents list from elsewhere in the component tree onto the Slot: “children” item in the component tree. The error appears on the Slot: “children” target.
The rules are NOT enforced with an error when dragging a new component not in the allowedComponents list from elsewhere in the component tree onto the actual component label itself (in my demo case ui/select) in the component tree.
What are the reproduction steps?
- register custom component with allowedComponents list
- add a component to the page that isn’t in the allowedComponents list
- add the custom component to the page
- drag the component not in allowedComponents onto the label of the custom Component (not the slot label
Relevant links:
N/A - here is a video though