Skip to content

Commit c539fb6

Browse files
committed
add placeholder
1 parent 6c48897 commit c539fb6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

frontend/src/components/Questions/QuestionsTable.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,16 @@ const filteredQuestions = questionsData.filter(question =>
8585
{/* Category Filter */}
8686
<Select
8787
multiple
88+
displayEmpty
8889
value={selectedCategories}
8990
onChange={handleCategoriesChange}
90-
renderValue={(selected) => (selected as string[]).join(", ")}
91+
renderValue={(selected) => {
92+
if (selected.length === 0) {
93+
return <em>Filter by category</em>;
94+
} else {
95+
return (selected as string[]).join(", ")}
96+
}
97+
}
9198
style={{ marginTop: "10px", marginBottom: "10px", width: "80%" }}
9299
>
93100
{uniqueCategories.map((category) => (

0 commit comments

Comments
 (0)