mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-23 08:55:25 +00:00
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user