mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix create variable modal not resetting in function wizard
This commit is contained in:
1 file changed
+9
-4
@@ -16,14 +16,19 @@
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
const handleVariable = () => {
|
||||
function close() {
|
||||
showCreate = false;
|
||||
selectedVar = null;
|
||||
}
|
||||
|
||||
function handleVariable() {
|
||||
if (selectedVar) {
|
||||
dispatch('updated', pair);
|
||||
} else {
|
||||
dispatch('created', pair);
|
||||
}
|
||||
showCreate = false;
|
||||
};
|
||||
close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal bind:show={showCreate} on:submit={handleVariable} size="big">
|
||||
@@ -48,7 +53,7 @@
|
||||
required />
|
||||
</FormList>
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (showCreate = false)}>Cancel</Button>
|
||||
<Button secondary on:click={close}>Cancel</Button>
|
||||
<Button submit>{selectedVar ? 'Update' : 'Create'}</Button>
|
||||
</svelte:fragment>
|
||||
</Modal>
|
||||
Reference in new issue
Block a user