diff --git a/assets/js/components/respondents/RespondentIndex.jsx b/assets/js/components/respondents/RespondentIndex.jsx index 572834edc..aa34a3530 100644 --- a/assets/js/components/respondents/RespondentIndex.jsx +++ b/assets/js/components/respondents/RespondentIndex.jsx @@ -137,14 +137,20 @@ class RespondentIndex extends Component { } } - showDownloadsModal() { + fetchFilesStatus() { const { projectId, surveyId, filter } = this.props // FIXME: don't fetch if we're already fetching this.props.surveyActions.fetchRespondentsFilesStatus(projectId, surveyId, filter) + } + + showDownloadsModal() { + const { projectId, surveyId, filter } = this.props + + this.fetchFilesStatus() if (this.state.filesFetchTimer == null) { const filesFetchTimer = setInterval(() => { - this.props.surveyActions.fetchRespondentsFilesStatus(projectId, surveyId, filter) + this.fetchFilesStatus() }, 20_000); this.setState({ filesFetchTimer }) }