Skip to content

Commit 500a173

Browse files
authored
Set default values on the invite and new env var forms to fix an issue after updating conform (#2084)
1 parent cc562c5 commit 500a173

File tree

2 files changed

+6
-0
lines changed
  • apps/webapp/app/routes
    • _app.orgs.$organizationSlug.invite
    • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new

2 files changed

+6
-0
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ export default function Page() {
134134
onValidate({ formData }) {
135135
return parse(formData, { schema });
136136
},
137+
defaultValue: {
138+
emails: [""],
139+
},
137140
});
138141

139142
const fieldValues = useRef<string[]>([""]);

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new/route.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ export default function Page() {
197197
return parse(formData, { schema });
198198
},
199199
shouldRevalidate: "onSubmit",
200+
defaultValue: {
201+
variables: [{ key: "", value: "" }],
202+
},
200203
});
201204

202205
const [revealAll, setRevealAll] = useState(true);

0 commit comments

Comments
 (0)