Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface UseSimpleQueryProps<TQueryParams, TResult>

Type parameters

  • TQueryParams

  • TResult

Hierarchy

  • UseSimpleQueryProps

Index

Properties

Optional debounceDelay

debounceDelay?: number

queryParams

queryParams: TQueryParams

Methods

Optional onError

  • onError(e: unknown): void
  • Parameters

    • e: unknown

    Returns void

Optional onLoadingChange

  • onLoadingChange(loading: boolean): void
  • Parameters

    • loading: boolean

    Returns void

Optional onQueryStarted

  • onQueryStarted(): void
  • Returns void

onResultReceived

  • onResultReceived(result: TResult): void
  • Parameters

    • result: TResult

    Returns void

query

  • query(queryParams: TQueryParams): CancellablePromise<TResult>
  • Parameters

    • queryParams: TQueryParams

    Returns CancellablePromise<TResult>

shouldQueryImmediately

  • shouldQueryImmediately(prevQueryParams: TQueryParams, queryParams: TQueryParams): boolean
  • Parameters

    • prevQueryParams: TQueryParams
    • queryParams: TQueryParams

    Returns boolean

Optional shouldSkipQuery

  • shouldSkipQuery(queryParams: TQueryParams): boolean
  • Useful in uncommon scenarios to prevent unnecessary asynchronous updates to a component

    Parameters

    • queryParams: TQueryParams

    Returns boolean

Generated using TypeDoc