SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function lazyModal

    • Creates a lazily loaded modal component that reports a failed load through onLoadError instead of throwing.

      Type Parameters

      • C extends ComponentType<any>

      Parameters

      • loader: () => Promise<{ default: C }>

        Loads a module whose default export is the modal component.

      Returns FC<ComponentProps<C> & LazyModalProps>

      Modal hosts such as mui-modal-provider render outside any error boundary, so a lazy modal must not throw. Opening the modal again after a failure loads the module again.