mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +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:
committed by
GitHub
parent
b419da427f
commit
4f3eb7b362
@@ -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