Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/Dialogs/CreateProjectDialogContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function CreateProjectDialogContainer({
const {
register,
handleSubmit,
reset,
resetField,
setValue,
formState: { errors },
watch,
Expand All @@ -57,9 +57,6 @@ export function CreateProjectDialogContainer({
{ name: username, roles: [MemberRoles.admin], kind: 'User' },
]);
}
return () => {
reset();
};
}, []);

const toast = useToast();
Expand All @@ -86,6 +83,9 @@ export function CreateProjectDialogContainer({
);
setIsOpen(false);
toast.show(t('CreateProjectDialog.toastMessage'));
resetField('name');
resetField('chargingTarget');
resetField('displayName');
return true;
} catch (e) {
console.error(e);
Expand Down
5 changes: 5 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,9 @@ body {

ui5-form-item {
margin-bottom: 24px;
}

ui5-toast {
width: 50ch;
max-width: 100%;
}