mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 07:16:01 +00:00
recreate object warning
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
import { getFormContext } from './FormProviderCore.svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let disabled;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
const { submitActionRef } = getFormContext();
|
||||
@@ -13,8 +15,10 @@
|
||||
}
|
||||
|
||||
submitActionRef.set(() => {
|
||||
handleClick();
|
||||
if (!disabled) {
|
||||
handleClick();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<FormStyledButton type="submit" on:click={handleClick} {...$$props} />
|
||||
<FormStyledButton type="submit" {disabled} on:click={handleClick} {...$$props} />
|
||||
|
||||
Reference in New Issue
Block a user