Interface IOutletProps<Data, Payload, Params>

Represents the properties of an outlet inner component.

interface IOutletProps<
    Data = IAnything,
    Payload = IAnything,
    Params = IAnything,
> {
    activeOption: string;
    afterSave: () => Promise<void>;
    beginSave: () => Promise<boolean>;
    data: Data;
    dirty: boolean;
    formState: {
        change: (data: Data) => void;
        data: Data;
        hasChanged: boolean;
        hasInvalid: boolean;
        hasLoading: boolean;
        id: string;
        payload: Payload;
    };
    hasChanged: boolean;
    hasInvalid: boolean;
    hasLoading: boolean;
    history: any;
    loading: boolean;
    onChange: (data: Data[keyof Data], initial?: boolean) => void;
    onInvalid: (name: string, msg: string) => void;
    params: Params;
    payload: Payload;
    readonly: boolean;
    setLoading: (loading: boolean) => void;
}

Type Parameters

  • Data = IAnything

    The type of the component's data.

  • Payload = IAnything

    The type of the component's payload.

  • Params = IAnything

    The type of the component's params.

Properties

activeOption: string

Represents the currently active option.

A string variable indicating the currently active option.

afterSave: () => Promise<void>

Executes the afterSave logic.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

      A Promise that resolves once the afterSave logic is completed.

beginSave: () => Promise<boolean>

Begins the save process.

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

      A promise that resolves to a boolean value indicating if the save process has started successfully.

data: Data

Represents the data of the outlet.

dirty: boolean

Indicates whether a certain state is dirty.

formState: {
    change: (data: Data) => void;
    data: Data;
    hasChanged: boolean;
    hasInvalid: boolean;
    hasLoading: boolean;
    id: string;
    payload: Payload;
}

Represents the state of a form.

hasChanged: boolean

Indicates whether a change has occurred.

hasInvalid: boolean

Indicates whether the value is invalid.

hasLoading: boolean

Represents the loading state of a system.

history: any

Represents the history of an outlet.

loading: boolean

Represents the loading status.

onChange: (data: Data[keyof Data], initial?: boolean) => void

A callback function that is invoked when a change event occurs.

Type declaration

    • (data: Data[keyof Data], initial?: boolean): void
    • Parameters

      • data: Data[keyof Data]

        The updated data value.

      • Optionalinitial: boolean

        Indicates whether the change is triggered initially.

      Returns void

onInvalid: (name: string, msg: string) => void

Callback function for handling an invalid event.

Type declaration

    • (name: string, msg: string): void
    • Parameters

      • name: string

        The name of the event that triggered the invalid event.

      • msg: string

        The error message associated with the invalid event.

      Returns void

      • This function does not return any value.
params: Params

Represents the parameters for a function.

payload: Payload

Represents a payload object.

readonly: boolean

Specifies whether a variable is read-only or not.

setLoading: (loading: boolean) => void

Sets the loading state to indicate whether the application is currently loading data or not.

Type declaration

    • (loading: boolean): void
    • Parameters

      • loading: boolean

        A boolean value indicating whether the application is currently loading data.

      Returns void