Function useOutletModal

A custom hook that provides functionality for managing and rendering an outlet modal.

  • Type Parameters

    • Data extends {} = Record<string, any>

      The type of data associated with the outlet modal.

    • Payload = any

      The type of payload passed during submission.

    • Params = any

      The type of additional parameters.

    Parameters

    Returns {
        close: (() => Promise<boolean>);
        open: ((url?: string | URL, target?: string, features?: string) => WindowProxy | null);
        pickData: ((id: string) => void);
        render: (() => Element);
    }

    • An object containing the following methods and properties:
      • open - A boolean value indicating whether the modal is open.
      • render - A function that renders the outlet modal.
      • pickData - A function used to pick data for the modal.
      • close - A function used to close the modal.
    • Readonlyclose: (() => Promise<boolean>)
        • (): Promise<boolean>
        • Returns Promise<boolean>

    • open: ((url?: string | URL, target?: string, features?: string) => WindowProxy | null)
        • (url?, target?, features?): WindowProxy | null
        • Parameters

          • Optionalurl: string | URL
          • Optionaltarget: string
          • Optionalfeatures: string

          Returns WindowProxy | null

    • pickData: ((id: string) => void)
        • (id): void
        • Parameters

          • id: string

          Returns void

    • render: (() => Element)
        • (): Element
        • Returns Element