allowedComponent not reflecting in Studio

Hi Team, I want to add some components to the allowedComponent prop for Form from the hostpage, but the change is not reflecting on plasmic project. Its happening only for “allowedComponent” prop. Can someone please look into it.

Hello @then_camel. Can you send us how you’re registering your components?

The code for registering Form :

registerComponent(Form, {
  name: "Form",
  displayName: "Form",
  props: {
    autoComplete: "string",
    children: {
      type: "slot",
      allowedComponents: ["FormItem", "Divider","slot"]     
    },
    form: "object",
    initialValues: "object",
    labelAlign: { type: "choice", options: ["left", "right"] },
    labelCol: "object",
    layout: { type: "choice", options: ["horizontal", "vertical", "inline"] },
    name: "string",
    size: { type: "choice", options: ["small", "middle", "large"] },
    validateMessages: "object",
    wrapperCol: "object",
    onFieldsChange: "object",
    onFinish: "object",
    onFinishFailed: "object",
    onValuesChange: "object",
  },
  importName: "Form",
  importPath: "antd"
})

I didnt understand the problem very well. After registering this component, you’re still able to add to the children prop any kind of component?

Hi @icaro even if remove allowedComponents and use children:“slot” , I am not able to add any components inside form other than FormItem and Divider.

I tried restarting the application, but it is still giving the same error.

Yep, looks like the component does not update when you change that property. For now, you’re able to do that only if you remove the Form component and then refreshing the studio, but i’ll see what I can do to make it work without this workaround

okay, thank you.

Hey, the fix should be up now.

Thank you very much its working now.