Skip to content
Discussion options

You must be logged in to vote

I found a way! the solution was enabled

import { useInfiniteQuery, useMutation } from 'react-query'
import { PagingResponse, ErrorResponse } from '../apis/util'
import {
  AnalysisListPatientQuery,
  getAnalysisListByPatientIdApi,
  AnalysisListPatientResponse,
  cancleAnalysisApi,
  retryAnalysisApi,
  deleteAnalysisApi,
} from '../apis/analysis'

export default (selectedPatientId?: number) =>
  useInfiniteQuery<
    PagingResponse<AnalysisListPatientResponse>,
    [string, Query],
    number | boolean | undefined,
    ErrorResponse
  >(['/analysis/list/patient', { patientId: selectedPatientId }], getApi, {
      enabled: !(selectedPatientId === undefined),   // When false is passed to e…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@qkreltms
Comment options

Answer selected by qkreltms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant