replaceAll

This commit is contained in:
Michiel Crefcoeur
2024-09-16 10:50:46 -07:00
committed by GitHub
parent 7f378b12ae
commit e1ec0aee69

View File

@@ -125,7 +125,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
placeholder="Frontend"
{...field}
onChange={(e) => {
const val = e.target.value?.trim().toLowerCase().replace(" ", "-") || "";
const val = e.target.value?.trim().toLowerCase().replaceAll(" ", "-") || "";
form.setValue("appName", `${slug}-${val}`);
field.onChange(val);
}}