@scenid/react-formulator 0.4.1 → 0.4.2

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/index.cjs.js CHANGED
@@ -31896,6 +31896,9 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
31896
31896
  }
31897
31897
  });
31898
31898
  }, [onChange]);
31899
+ React.useEffect(function () {
31900
+ fetch();
31901
+ }, []);
31899
31902
 
31900
31903
  if (readOnly) {
31901
31904
  return /*#__PURE__*/React__default["default"].createElement(FormField$1, {
package/dist/index.esm.js CHANGED
@@ -31827,6 +31827,9 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
31827
31827
  }
31828
31828
  });
31829
31829
  }, [onChange]);
31830
+ useEffect(function () {
31831
+ fetch();
31832
+ }, []);
31830
31833
 
31831
31834
  if (readOnly) {
31832
31835
  return /*#__PURE__*/React__default.createElement(FormField$1, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scenid/react-formulator",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "repository": "https://dennykoch@bitbucket.org/scenid/react-formulator.git",
@@ -1,4 +1,4 @@
1
- import React, { useCallback } from 'react'
1
+ import React, { useEffect, useCallback } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
 
4
4
  import { Box, Typography, FormControl, FormHelperText } from '@material-ui/core'
@@ -29,6 +29,8 @@ const FormAutocomplete = ({
29
29
 
30
30
  const changeValue = useCallback(newValue => { onChange({ target: { name, value: newValue?.entry || '' } }) }, [onChange])
31
31
 
32
+ useEffect(() => { fetch() }, [])
33
+
32
34
  if (readOnly) {
33
35
  return (
34
36
  <FormField