mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: id resets when modal is closed
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
const create = async () => {
|
||||
try {
|
||||
const team = await sdkForProject.teams.create(id ? id : 'unique()', name);
|
||||
const team = await sdkForProject.teams.create(id ?? 'unique()', name);
|
||||
name = '';
|
||||
showCreate = false;
|
||||
dispatch('created', team);
|
||||
@@ -26,6 +26,10 @@
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$: if (!showDropdown) {
|
||||
id = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<Form on:submit={create}>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
const create = async () => {
|
||||
try {
|
||||
const user = await sdkForProject.users.create(id ? id : 'unique()', mail, pass, name);
|
||||
const user = await sdkForProject.users.create(id ?? 'unique()', mail, pass, name);
|
||||
mail = pass = name = '';
|
||||
showCreate = false;
|
||||
dispatch('created', user);
|
||||
@@ -33,6 +33,10 @@
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$: if (!showDropdown) {
|
||||
id = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<Form on:submit={create}>
|
||||
|
||||
Reference in New Issue
Block a user