Function createMdvPortal

It also makes sure that any common global context, styles etc are applied. todo - this is a placeholder for refactoring so that there is a single react root, then charts/dialogs etc will be rendered into it with portals.

  • Parameters

    • component: Element

      the component to render

    • container: HTMLElement

      the container to render into

    • Optionalparent: BaseDialog | BaseChart<any>

      'parent' chart or dialog that can be used to determine the container to be used for anything that needs to be rendered outside of the main container. Currently this will be something that has { observable: { container: HTMLElement } } as a property. If not provided, the default is document.body.

    Returns Root

    the root element that was created