@flowgram.ai/form 0.2.24 → 0.2.26

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.
package/dist/esm/index.js CHANGED
@@ -1463,6 +1463,10 @@ function createForm(options) {
1463
1463
  }
1464
1464
 
1465
1465
  // src/react/form.tsx
1466
+ function FormContentRender(props) {
1467
+ const { form, render } = props;
1468
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, render({ form }));
1469
+ }
1466
1470
  function Form(props) {
1467
1471
  const { children, keepModelOnUnMount = false, control, ...restOptions } = props;
1468
1472
  const { _formModel: formModel } = useMemo2(
@@ -1478,7 +1482,7 @@ function Form(props) {
1478
1482
  []
1479
1483
  );
1480
1484
  const form = useMemo2(() => toForm(formModel), [formModel]);
1481
- return /* @__PURE__ */ React3.createElement(FormModelContext.Provider, { value: formModel }, children ? isFunction2(children) ? children({ form }) : Children.only(children) : null);
1485
+ return /* @__PURE__ */ React3.createElement(FormModelContext.Provider, { value: formModel }, children ? isFunction2(children) ? /* @__PURE__ */ React3.createElement(FormContentRender, { form, render: children }) : Children.only(children) : null);
1482
1486
  }
1483
1487
 
1484
1488
  // src/react/use-form.ts