Fix Select.Item value error
The AI will address the "A <Select.Item /> must have a value prop that is not an empty string" error. It will review the code, particularly the `Select.Item` components, to ensure that the `value` prop is always populated with a non-empty string.
This commit is contained in:
parent
bfdd935853
commit
cb3f41b8ff
@ -29,8 +29,8 @@ export function GroupSelectField({ form, grupos }: GroupSelectFieldProps) {
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Grupo (Opcional)</FormLabel>
|
<FormLabel>Grupo (Opcional)</FormLabel>
|
||||||
<Select
|
<Select
|
||||||
onValueChange={(value) => field.onChange(value || null)}
|
onValueChange={(value) => field.onChange(value === "none" ? null : value)}
|
||||||
value={field.value || ""}
|
value={field.value || "none"}
|
||||||
>
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
@ -38,7 +38,7 @@ export function GroupSelectField({ form, grupos }: GroupSelectFieldProps) {
|
|||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="">Nenhum grupo</SelectItem>
|
<SelectItem value="none">Nenhum grupo</SelectItem>
|
||||||
{gruposValidos.map((grupo) => (
|
{gruposValidos.map((grupo) => (
|
||||||
<SelectItem
|
<SelectItem
|
||||||
key={grupo.remote_jid}
|
key={grupo.remote_jid}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user