Interface contract for callback functions used in IList functionality.

interface IListCallbacks<
    FilterData extends {} = IAnything,
    RowData extends IRowData = IAnything,
> {
    computeKeepPageOnReload: () => boolean;
    handleChips: (chips: Partial) => void;
    handleDefault: () => Promise<void>;
    handleFilter: (data: FilterData, keepPagination?: boolean) => void;
    handleFiltersCollapsed: (filtersCollapsed: boolean) => void;
    handleLimitChange: (limit: number) => void;
    handlePageChange: (page: number) => void;
    handleReload: (keepPagination?: boolean) => Promise<void>;
    handleRerender: () => void;
    handleRowsChange: (rows: RowData[]) => void;
    handleSearch: (search: string) => void;
    handleSortModel: (sort: ListHandlerSortModel<RowData>) => void;
}

Type Parameters

  • FilterData extends {} = IAnything

    The type of data to be used in filter operations.

  • RowData extends IRowData = IAnything

    The type of data contained in each row.

Hierarchy (View Summary)

Properties

computeKeepPageOnReload: () => boolean
handleChips: (chips: Partial) => void

Handles the chips list.

Type declaration

    • (chips: Partial): void
    • Parameters

      • chips: Partial

        The list of chips to be handled.

      Returns void

handleDefault: () => Promise<void>

Handles the list state reset.

Type declaration

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

      A promise that resolves with no value.

handleDefault

handleFilter: (data: FilterData, keepPagination?: boolean) => void

Handles the filter action.

Type declaration

    • (data: FilterData, keepPagination?: boolean): void
    • Parameters

      • data: FilterData

        The filter data to be processed.

      • OptionalkeepPagination: boolean

        Indicates whether to keep the pagination state. Defaults to false.

      Returns void

handleFiltersCollapsed: (filtersCollapsed: boolean) => void

Handles the event when the filters are collapsed or expanded.

Type declaration

    • (filtersCollapsed: boolean): void
    • Parameters

      • filtersCollapsed: boolean

        Indicates whether the filters are collapsed or expanded.

      Returns void

handleLimitChange: (limit: number) => void

Handles a change in the limit value.

Type declaration

    • (limit: number): void
    • Parameters

      • limit: number

        The new limit value.

      Returns void

handlePageChange: (page: number) => void

Handle page change function.

Type declaration

    • (page: number): void
    • Parameters

      • page: number

        The page number being handled.

      Returns void

      • There is no return value.
handleReload: (keepPagination?: boolean) => Promise<void>

Reloads the data and updates the UI.

Type declaration

    • (keepPagination?: boolean): Promise<void>
    • Parameters

      • OptionalkeepPagination: boolean

        Determines whether to keep the current pagination state. If set to true, the pagination will not be reset after reloading. If not provided or set to false, the pagination will be reset to its initial state.

      Returns Promise<void>

      • A promise that resolves once the data has been reloaded and the UI has been updated.
handleRerender: () => void

Function to handle re-rendering.

Type declaration

    • (): void
    • Returns void

handleRerender

handleRowsChange: (rows: RowData[]) => void

Callback function to handle changes in rows.

Type declaration

    • (rows: RowData[]): void
    • Parameters

      • rows: RowData[]

        An array of row data.

      Returns void

      • This function does not return anything.
handleSearch: (search: string) => void

Handles the search action.

Type declaration

    • (search: string): void
    • Parameters

      • search: string

        The search query entered by the user.

      Returns void

handleSortModel: (sort: ListHandlerSortModel<RowData>) => void

Handles the sort model for the given sort.

Type declaration