Represents an interface for interacting with the One component by api ref.

interface IOneApi<Data = IAnything> {
    change: (data: Data, initial?: boolean) => void;
    getData: () => Data;
    reload: () => Promise<void>;
}

Type Parameters

  • Data = IAnything

    The type of data that the OneApi operates on.

Properties

Properties

change: (data: Data, initial?: boolean) => void

Changes the provided data.

Type declaration

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

      • data: Data

        The data to be changed.

      • Optionalinitial: boolean

        Indicates if the change is an initial change.

      Returns void

getData: () => Data

Retrieves the data.

Type declaration

    • (): Data
    • Returns Data

      The retrieved data.

getData

reload: () => Promise<void>

Reloads the current page.

Type declaration

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

      • A Promise that resolves when the page reload is completed.

reload