Skip to content

Commit 9216e36

Browse files
committed
fixes
1 parent fd86660 commit 9216e36

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/components/Dialogs/CreateProjectDialogContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function CreateProjectDialogContainer({
3333
const {
3434
register,
3535
handleSubmit,
36-
reset,
36+
resetField,
3737
setValue,
3838
formState: { errors },
3939
watch,
@@ -57,9 +57,6 @@ export function CreateProjectDialogContainer({
5757
{ name: username, roles: [MemberRoles.admin], kind: 'User' },
5858
]);
5959
}
60-
return () => {
61-
reset();
62-
};
6360
}, []);
6461

6562
const toast = useToast();
@@ -86,6 +83,9 @@ export function CreateProjectDialogContainer({
8683
);
8784
setIsOpen(false);
8885
toast.show(t('CreateProjectDialog.toastMessage'));
86+
resetField('name');
87+
resetField('chargingTarget');
88+
resetField('displayName');
8989
return true;
9090
} catch (e) {
9191
console.error(e);

src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,9 @@ body {
107107

108108
ui5-form-item {
109109
margin-bottom: 24px;
110+
}
111+
112+
ui5-toast {
113+
width: 50ch;
114+
max-width: 100%;
110115
}

0 commit comments

Comments
 (0)