mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Fix Select empty value error in DarePacksPage
This commit is contained in:
1 parent
b933c3c421
commit
fc515a19b0
1 file changed
+3
-3
@@ -359,14 +359,14 @@ export function DarePacksPage() {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label>Category (optional)</Label>
|
<Label>Category (optional)</Label>
|
||||||
<Select
|
<Select
|
||||||
value={form.formData.category_id}
|
value={form.formData.category_id || '__none__'}
|
||||||
onValueChange={(value) => form.setField('category_id', value)}
|
onValueChange={(value) => form.setField('category_id', value === '__none__' ? '' : value)}
|
||||||
>
|
>
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
<SelectValue placeholder="Select a category" />
|
<SelectValue placeholder="Select a category" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="">No category</SelectItem>
|
<SelectItem value="__none__">No category</SelectItem>
|
||||||
{categories.map((cat) => (
|
{categories.map((cat) => (
|
||||||
<SelectItem key={cat.id} value={cat.id}>
|
<SelectItem key={cat.id} value={cat.id}>
|
||||||
{cat.name}
|
{cat.name}
|
||||||
|
|||||||
Reference in new issue
Block a user