diff --git a/src/core_modules/capture-core/components/ScopeSelector/QuickSelector/Program/ProgramSelector.component.js b/src/core_modules/capture-core/components/ScopeSelector/QuickSelector/Program/ProgramSelector.component.js index 3af9b00bd8..d6d0ec6ad6 100644 --- a/src/core_modules/capture-core/components/ScopeSelector/QuickSelector/Program/ProgramSelector.component.js +++ b/src/core_modules/capture-core/components/ScopeSelector/QuickSelector/Program/ProgramSelector.component.js @@ -50,6 +50,7 @@ const ProgramSelectorPlain = ({ const [programsArray, setProgramsArray] = useState>([]); const selectedProgram = selectedProgramId ? programCollection.get(selectedProgramId) : null; const programOptions = getOptions(selectedOrgUnitId, programsArray); + const isMenuDisabled = !handleClickProgram; useEffect(() => { setProgramsArray(Array.from(programCollection.values())); @@ -83,7 +84,8 @@ const ProgramSelectorPlain = ({ noValueMessage={i18n.t('Choose a program')} value={selectedProgram && } open={open} - setOpen={openSelectorBarItem => setOpen(openSelectorBarItem)} + setOpen={openSelectorBarItem => (isMenuDisabled ? null : setOpen(openSelectorBarItem))} + displayOnly={isMenuDisabled} onClearSelectionClick={() => onResetProgramId(resetProgramIdBase())} dataTest="program-selector-container" >