mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-14 07:55:18 +00:00
Generate valid appName on changing name
The same can probably also be done at other places. Should probably be solved in a generic way.
This commit is contained in:
@@ -125,7 +125,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
placeholder="Frontend"
|
placeholder="Frontend"
|
||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = e.target.value?.trim() || "";
|
const val = e.target.value?.trim().toLowerCase().replace(" ", "-") || "";
|
||||||
form.setValue("appName", `${slug}-${val}`);
|
form.setValue("appName", `${slug}-${val}`);
|
||||||
field.onChange(val);
|
field.onChange(val);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user