Represents the props for the ITabsModal component.

interface ITabsModalProps<
    Data extends {} = Record<string, any>,
    Payload = IAnything,
> {
    AfterTitle?: any;
    BeforeTitle?: any;
    data?: null | Data;
    fallback?: (e: Error) => void;
    fetchState?:
        | TupleState<object, any, any, any, any, any, any, any, any, any, any>
        | ObjectState<object, any>;
    fullScreen?: boolean;
    hidden?: boolean;
    mapInitialData?: (data: Record<string, any>[]) => Data | Promise<Data>;
    mapPayload?: (data: Record<string, any>[]) => Payload | Promise<Payload>;
    onClose?: () => void;
    onLoadEnd?: (isOk: boolean) => void;
    onLoadStart?: () => void;
    onMount?: () => void;
    onSubmit?: (
        data: null | Data,
        payload: Payload,
    ) => boolean | Promise<boolean>;
    onUnmount?: () => void;
    openSubject: TBehaviorSubject<boolean>;
    reloadSubject?: TSubject<void>;
    routes: ITabsModal<Data, Payload>[];
    sizeRequest?: (size: ISize) => { height: number; sx?: any; width: number };
    submitIcon?: any;
    submitLabel?: string;
    throwError?: boolean;
    title?: string;
    withActionButton?: boolean;
    withStaticAction?: boolean;
    [key: string]: BoxProps;
    [key: number]: BoxProps;
    [key: symbol]: BoxProps;
}

Type Parameters

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

    The type of data being passed to the ITabsModal component.

  • Payload = IAnything

    The type of payload being passed to the ITabsModal component.

Hierarchy

  • Omit<
        ITabsViewProps<Data, Payload>,
        keyof {
            data: never;
            id: never;
            initialData: never;
            onSubmit: never;
            otherProps: never;
            outlinePaper: never;
            params: never;
            payload: never;
            routes: never;
            transparentPaper: never;
        },
    >
    • ITabsModalProps

Indexable

  • [key: string]: BoxProps
  • [key: number]: BoxProps
  • [key: symbol]: BoxProps

Properties

AfterTitle?: any

A component that is rendered after the title of the ITabsModal.

BeforeTitle?: any

A component that is rendered before the title of the ITabsModal.

data?: null | Data

The data of the ITabsModal.

fallback?: (e: Error) => void

A function that is called when an error occurs in the ITabsModal.

fetchState?:
    | TupleState<object, any, any, any, any, any, any, any, any, any, any>
    | ObjectState<object, any>

The fetch state of the ITabsModal.

fullScreen?: boolean

Determines if the ITabsModal should be full screen or not.

hidden?: boolean

Determines if the ITabsModal should be hidden or not.

mapInitialData?: (data: Record<string, any>[]) => Data | Promise<Data>

A function that maps the data to the initialData.

mapPayload?: (data: Record<string, any>[]) => Payload | Promise<Payload>

A function that maps the data to the payload.

onClose?: () => void

A function that is called when the ITabsModal is closed.

onLoadEnd?: (isOk: boolean) => void

A function that is called when the ITabsModal finishes loading.

onLoadStart?: () => void

A function that is called when the ITabsModal starts loading.

onMount?: () => void

A function that is called when the ITabsModal is mounted.

onSubmit?: (data: null | Data, payload: Payload) => boolean | Promise<boolean>

A function that handles the submission of data and payload.

onUnmount?: () => void

A function that is called when the ITabsModal is unmounted.

openSubject: TBehaviorSubject<boolean>

The behavior subject that determines if the ITabsModal is open or closed.

reloadSubject?: TSubject<void>

The subject that triggers a reload of the ITabsModal.

routes: ITabsModal<Data, Payload>[]

The routes of the ITabsModal.

sizeRequest?: (size: ISize) => { height: number; sx?: any; width: number }

A function that determines the size of the ITabsModal.

submitIcon?: any
submitLabel?: string

The label for the submit button of the ITabsModal.

throwError?: boolean

Determines if the ITabsModal should throw an error or not.

title?: string

The title of the ITabsModal.

withActionButton?: boolean

Determines if the ITabsModal has an action button or not.

withStaticAction?: boolean

Determines if the ITabsModal has a static action or not.