Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/pages/academy/grading/Grading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ const Grading: React.FC = () => {

const isAdmin = role === Role.Admin;
const [showAllGroups, setShowAllGroups] = useState(isAdmin || group === null);
const handleShowAllGroups = (value: boolean) => {
// Admins will always see all groups regardless
setShowAllGroups(isAdmin || value);
};
const groupOptions = [
{ value: false, label: 'my groups' },
{ value: true, label: 'all groups' }
Expand Down Expand Up @@ -122,7 +118,7 @@ const Grading: React.FC = () => {
<SimpleDropdown
options={groupOptions}
defaultValue={showAllGroups}
onClick={handleShowAllGroups}
onClick={setShowAllGroups}
popoverProps={{ position: Position.BOTTOM }}
buttonProps={{ minimal: true, rightIcon: 'caret-down' }}
/>
Expand Down