findNamespaceRoot(component) {
    const path = getArrayFromComponentPath(component.path);
    // First get the component with nested parents.
    let comp = this.webform.getComponent(path);
    comp = Array.isArray(comp) ? comp[0] : comp;
    const namespaceKey = this.recurseNamespace(comp);

    // If there is no key, it is the root form.
    if (!namespaceKey || this.form.key === namespaceKey) {
      return this.form.components;
    }

    const componentSchema = component.component;
    // If the current component is the namespace, we don't need to find it again.
    if (namespaceKey === component.key) {
      return [...componentSchema.components, componentSchema];
    }

    // Get the namespace component so we have the original object.
    const namespaceComponent = getComponent(this.form.components, namespaceKey, true);
    return namespaceComponent ? namespaceComponent.components : comp.components;
  }
When a component sets its api key, we need to check if it is unique within its namespace. Find the namespace root
so we can calculate this correctly.
@param {import('@formio/core').Component} component - The component to find the namespace root for.
@returns {import('@formio/core').Component[]} - The components root for this namespace.