diff --git a/src/components/common/Filters/filters.tsx b/src/components/common/Filters/filters.tsx index fc9f5fe3..76dea8b1 100644 --- a/src/components/common/Filters/filters.tsx +++ b/src/components/common/Filters/filters.tsx @@ -247,9 +247,12 @@ const Filters = ({ MenuProps={{ autoFocus: false }} > {/* select all sessions */} - + 0 && + chosenSessions.length === academicSessions.length + } indeterminate={ chosenSessions.length !== academicSessions.length && chosenSessions.length !== 0 && @@ -258,24 +261,37 @@ const Filters = ({ chosenSessions.every((el) => recentSemesters.includes(el)) ) // select-all is not indeterminate when recent is checked } + disabled={academicSessions.length == 0} + /> + 0 ? '' : 'text-gray-400'} + primary="Select All" /> - {/* recent sessions -- last long-semesters from current semester*/} - + 0 && chosenSessions.length === recentSemesters.length && chosenSessions.every((el) => recentSemesters.includes(el)) } + disabled={recentSemesters.length == 0} + /> + 0 ? '' : 'text-gray-400'} + primary="Recent" /> - {/* indiv options */} {academicSessions.map((session) => ( - +