mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 14:06:00 +00:00
form provider
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import FormStyledButton from '../widgets/FormStyledButton.svelte';
|
||||
import { getFormContext } from './FormProviderCore.svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
const { submitActionRef } = getFormContext();
|
||||
|
||||
submitActionRef.current = () => {
|
||||
dispatch('click');
|
||||
};
|
||||
</script>
|
||||
|
||||
<FormStyledButton type="submit" on:click {...$$props} />
|
||||
|
||||
Reference in New Issue
Block a user