diff --git a/src/components/Interpretations/InterpretationModal/InterpretationModal.js b/src/components/Interpretations/InterpretationModal/InterpretationModal.js index 13f6285af..3d29328c6 100644 --- a/src/components/Interpretations/InterpretationModal/InterpretationModal.js +++ b/src/components/Interpretations/InterpretationModal/InterpretationModal.js @@ -14,7 +14,7 @@ import { } from '@dhis2/ui' import cx from 'classnames' import PropTypes from 'prop-types' -import React, { useEffect, useState } from 'react' +import React, { useEffect, useState, useMemo } from 'react' import css from 'styled-jsx/css' import { InterpretationThread } from './InterpretationThread.js' import { useModalContentWidth } from './useModalContentWidth.js' @@ -115,6 +115,12 @@ const InterpretationModal = ({ } }, [interpretationId, refetch]) + const filters = useMemo(() => { + return { + relativePeriodDate: interpretation?.created, + } + }, [interpretation?.created]) + return ( <> {loadingInProgress && ( @@ -162,10 +168,7 @@ const InterpretationModal = ({