Merge pull request #5745 from Dokploy/fix/select-empty-value-on-reset

fix: prevent Radix Select from clearing form values on reset
This commit is contained in:
Mauricio Siu
2026-10-22 14:32:28 -06:00
committed by GitHub
+10 -1
View File
@@ -4,9 +4,18 @@ import type * as React from "react";
import { cn } from "@/lib/utils";
function Select({
onValueChange,
...props
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
return <SelectPrimitive.Root data-slot="select" {...props} />;
return (
<SelectPrimitive.Root
data-slot="select"
onValueChange={(value) => {
if (value !== "") onValueChange?.(value);
}}
{...props}
/>
);
}
function SelectGroup({