Sanity Library Reference Docs
    Preparing search index...

    Interface PaneRouterContextValueBeta

    interface PaneRouterContextValue {
        BackLink?: ComponentType<BackLinkProps>;
        ChildLink: ComponentType<ChildLinkProps>;
        closeCurrent: () => void;
        closeCurrentAndAfter: (expandLast?: boolean) => void;
        createPathWithParams: (params: Record<string, string>) => string;
        duplicateCurrent: (
            pane?: { params?: Record<string, string>; payload?: unknown },
        ) => void;
        groupIndex: number;
        groupLength: number;
        handleEditReference: (options: EditReferenceOptions) => void;
        hasGroupSiblings: boolean;
        index: number;
        navigateIntent: (
            intentName: string,
            params: Record<string, string>,
            options?: { replace?: boolean },
        ) => void;
        ParameterizedLink: ComponentType<ParameterizedLinkProps>;
        params?: Record<string, string>;
        payload?: unknown;
        ReferenceChildLink: ComponentType<ReferenceChildLinkProps>;
        replaceCurrent: (
            pane: {
                id?: string;
                params?: Record<string, string>;
                payload?: unknown;
            },
        ) => void;
        routerPanesState: RouterPanes;
        setParams: (
            params: Record<string, string>,
            stickyParams?: Record<string, string>,
        ) => void;
        setPayload: (payload: unknown) => void;
        setView: (viewId: string) => void;
        siblingIndex: number;
    }
    Index

    Properties

    BackLink?: ComponentType<BackLinkProps>

    Curried StateLink that pops off the last pane group

    ChildLink: ComponentType<ChildLinkProps>

    Curried StateLink that passes the correct state automatically

    closeCurrent: () => void

    Removes the current pane from the group

    closeCurrentAndAfter: (expandLast?: boolean) => void

    Removes all panes to the right including current pane

    createPathWithParams: (params: Record<string, string>) => string

    A function that creates a path with the given parameters without navigating to it. Useful for creating links that can be e.g. copied to clipboard and shared.

    duplicateCurrent: (
        pane?: { params?: Record<string, string>; payload?: unknown },
    ) => void

    Duplicate the current pane, with optional overrides for item ID and parameters

    groupIndex: number

    Zero-based index of pane group (within URL structure)

    groupLength: number

    The length of the current group

    handleEditReference: (options: EditReferenceOptions) => void

    Similar to ReferenceChildLink expect without the wrapping component

    hasGroupSiblings: boolean

    Whether or not the pane has any siblings (within the same group)

    index: number

    Zero-based index (position) of pane, visually

    navigateIntent: (
        intentName: string,
        params: Record<string, string>,
        options?: { replace?: boolean },
    ) => void

    Proxied navigation to a given intent. Consider just exposing router instead?

    ParameterizedLink: ComponentType<ParameterizedLinkProps>

    Curried StateLink that passed the correct state, but merges params/payload

    params?: Record<string, string>

    Params of the current pane

    payload?: unknown

    Payload of the current pane

    ReferenceChildLink: ComponentType<ReferenceChildLinkProps>

    A specialized ChildLink that takes in the needed props to open a referenced document to the right

    replaceCurrent: (
        pane: {
            id?: string;
            params?: Record<string, string>;
            payload?: unknown;
        },
    ) => void

    Replaces the current pane with a new one

    routerPanesState: RouterPanes

    Current router state for the "panes" property

    setParams: (
        params: Record<string, string>,
        stickyParams?: Record<string, string>,
    ) => void

    Set the parameters for the current pane

    setPayload: (payload: unknown) => void

    Set the payload for the current pane

    setView: (viewId: string) => void

    Set the current "view" for the pane

    siblingIndex: number

    Zero-based index of pane within sibling group