Skip to content

Commit

Permalink
Merge pull request #269 from NIAEFEUP/fix/schedule-preview-restore-on…
Browse files Browse the repository at this point in the history
…-esc

fix: schedule preview is restored on esc
  • Loading branch information
tomaspalma committed Aug 28, 2024
2 parents 7ea76ae + 1a3c9bf commit 99d3db5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,12 @@ const ClassSelector = ({ course }: Props) => {
</p>
<div className="flex items-center">
{/* Dropdown Menu */}
<DropdownMenu onOpenChange={setIsDropdownOpen}>
<DropdownMenu onOpenChange={(open: boolean) => {
setIsDropdownOpen(open);
if (!open) {
removePreview();
}
}}>
<DropdownMenuTrigger asChild disabled={courseOption?.locked} ref={classSelectorTriggerRef}>
<Button
variant="outline"
Expand Down

0 comments on commit 99d3db5

Please sign in to comment.