removeComponent(component, components, all = false) {
    components = components || this.components;
    component.destroy(all);
    _.remove(components, { id: component.id });
    if (this.componentsMap[component.path]) {
      delete this.componentsMap[component.path];
    }
  }
Remove a component from the components array and from the children object
@param {import('@formio/core').Component} component - The component to remove from the components.
@param {import('@formio/core').Component[]} components - An array of components to remove this component from.
@param {boolean} [all] - If set to TRUE will cascade remove all components.