Skip to content

Commit

Permalink
Merge pull request #460 from salimshamim/salimshamim/459
Browse files Browse the repository at this point in the history
 BugFix: when clicked on one of the items of the sort dropdown, it is…
  • Loading branch information
devsargam authored Aug 17, 2024
2 parents b087482 + 00919bd commit 71337fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/web/components/Tracks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const Tracks = ({ tracks }: { tracks: TrackPros[] }) => {
const selectedCategory = useRecoilValue(category);
const [filteredTracks, setFilteredTracks] = useState<TrackPros[]>(tracks);
const [sortBy, setSortBy] = useState<string>("");
const [isSelectOpen, setIsSelectOpen] = useState<boolean>(false);
const [cohort3, setCohort3] = useState<boolean>(false);

const filterTracks = () => {
Expand Down Expand Up @@ -56,6 +57,8 @@ export const Tracks = ({ tracks }: { tracks: TrackPros[] }) => {
<div>
<div className="flex flex-col gap-4 md:flex-row items-center justify-evenly mt-6">
<Select
open = {isSelectOpen}
onOpenChange={() => { setTimeout(() => { setIsSelectOpen(!isSelectOpen); }, 20); }}
onValueChange={(e) => {
setSortBy(e);
}}
Expand Down

0 comments on commit 71337fe

Please sign in to comment.