Skip to content

Commit

Permalink
fix the filter search
Browse files Browse the repository at this point in the history
  • Loading branch information
muzammil-85 committed Jan 27, 2025
1 parent 7d6df30 commit 20d2b76
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 237 deletions.
56 changes: 29 additions & 27 deletions src/app/activityList/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ const ActivityList = () => {
)}
/>

{selectedSubCategory !== 'College' && (
{selectedGrpType == 'Educational Institution' && selectedSubCategory !== 'College' && (
<FormField
control={form.control}
name="schooltype"
Expand Down Expand Up @@ -1370,32 +1370,34 @@ const ActivityList = () => {
/>
</>
)}
<FormField
control={form.control}
name="subCategory"
render={({ field }) => (
<FormItem className="w-full">
<Select onValueChange={(value) => {
field.onChange(value);
setSelectedSubCategory(value);
}} defaultValue={field.value}>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Choose a sub category" />
</SelectTrigger>
</FormControl>
<SelectContent>
{subcategoryOptions.map((category) => (
<SelectItem key={category.gp_cat_id} value={category.gp_cat_name}>
{category.gp_cat_name}
</SelectItem>
))}
</SelectContent>
</Select>
<FormMessage />
</FormItem>
)}
/>
{selectedGrpType == 'Educational Institution' &&
<FormField
control={form.control}
name="subCategory"
render={({ field }) => (
<FormItem className="w-full">
<Select onValueChange={(value) => {
field.onChange(value);
setSelectedSubCategory(value);
}} defaultValue={field.value}>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Choose a sub category" />
</SelectTrigger>
</FormControl>
<SelectContent>
{subcategoryOptions.map((category) => (
<SelectItem key={category.gp_cat_id} value={category.gp_cat_name}>
{category.gp_cat_name}
</SelectItem>
))}
</SelectContent>
</Select>
<FormMessage />
</FormItem>
)}
/>
}
{/* Group Name Select */}

<div className="w-full sm:col-span-2 md:col-span-1">
Expand Down
Loading

0 comments on commit 20d2b76

Please sign in to comment.