mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-23 08:55:25 +00:00
fix(select): prevent clearing form values on reset by ignoring empty selections
This commit is contained in:
@@ -10,9 +10,6 @@ function Select({
|
||||
return (
|
||||
<SelectPrimitive.Root
|
||||
data-slot="select"
|
||||
// Radix's hidden native <select> emits "" when the value is set before
|
||||
// the options mount (e.g. form.reset), wiping the field. Items can't have
|
||||
// an empty value, so "" is never a real selection.
|
||||
onValueChange={(value) => {
|
||||
if (value !== "") onValueChange?.(value);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user