From 006f50a9ea1a0277edd9624bfa7ee7de296f20b7 Mon Sep 17 00:00:00 2001 From: shonibare <47093379+shonibare@users.noreply.github.com> Date: Mon, 13 Mar 2023 10:31:31 -0400 Subject: [PATCH] [media] add feedback to dropdown field when is empty (#8402) Fixes #7951 --- modules/media/jsx/uploadForm.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/media/jsx/uploadForm.js b/modules/media/jsx/uploadForm.js index 8146f3c2bdd..6ce83d0f2ea 100644 --- a/modules/media/jsx/uploadForm.js +++ b/modules/media/jsx/uploadForm.js @@ -110,8 +110,14 @@ class MediaUploadForm extends Component { && this.state.formData.visitLabel ? this.state.Data.sessionData[this.state.formData.pscid] .instruments[this.state.formData.visitLabel] : - {}; - return ( + {}; + const visitErrMsg = visits && visits.length === 0 ? + 'No visits available for this candidate' : + ''; + const instErrMsg = instruments && instruments.length === 0 ? + 'No instruments available for this visit' : + ''; + return (