Provides a set of actions and hooks for managing a list of data.

  • Type Parameters

    Parameters

    • params: IParams<Data>

      The parameters for configuring the list actions.

      • onLoadStart

        The function to be called when data loading starts.

      • onLoadEnd

        The function to be called when data loading ends.

      • throwError

        The function to be called when an error occurs.

      • fallback

        The function to be called when data loading fails.

      • fetchRow

        The function to fetch a single row of data.

      • onAction

        The function to be called when a bulk action is performed.

      • onRowAction

        The function to be called when a row action is performed.

    Returns {
        commitAction: (p?: string) => Promise<null | void>;
        commitRowAction: (action: string, row: Data) => Promise<null | void>;
        deselectAll: () => void;
        listProps: {
            onSelectedRows: (rowIds: RowId[]) => void;
            selectedRows: RowId[];
        };
        selectedRows: RowId[];
    }

    • The list actions and necessary data.