sveltedfire 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  <script lang="ts">
2
2
  import { handleForm } from "../utilities/handleForm.js";
3
3
 
4
- let { collectionName, docId = null, docIdField = null, onSubmit, children, beforeSubmit = null, ...rest } = $props()
4
+ let { collectionName, docId = null, docIdField = null, onSubmit, children, beforeSubmit = null, formRef = $bindable(), ...rest } = $props()
5
5
 
6
6
  const submitTheForm = handleForm({ collectionName, docId, docIdField, onSubmit, beforeSubmit })
7
7
  </script>
8
8
 
9
- <form onsubmit={submitTheForm} {...rest}>
9
+ <form onsubmit={submitTheForm} bind:this={formRef} {...rest}>
10
10
  {@render children()}
11
11
  </form>
@@ -5,6 +5,7 @@ declare const FireForm: import("svelte").Component<{
5
5
  onSubmit: any;
6
6
  children: any;
7
7
  beforeSubmit?: any;
8
- } & Record<string, any>, {}, "">;
8
+ formRef?: any;
9
+ } & Record<string, any>, {}, "formRef">;
9
10
  type FireForm = ReturnType<typeof FireForm>;
10
11
  export default FireForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltedfire",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",