@scenid/react-formulator 0.4.0 → 0.4.1

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
@@ -29300,7 +29300,7 @@ var FormControlField$1 = function FormControlField(_ref) {
29300
29300
  control: control,
29301
29301
  label: label,
29302
29302
  labelPlacement: finalProps.labelPlacement || 'end'
29303
- }), !isSwitch && !isRepeater && !isRender && control, dirty && hasErrors && /*#__PURE__*/React__default["default"].createElement(_FormHelperText__default["default"], null, errors.map(function (e) {
29303
+ }), !isSwitch && !isRepeater && !isRender && control, dirty && !disabled && hasErrors && /*#__PURE__*/React__default["default"].createElement(_FormHelperText__default["default"], null, errors.map(function (e) {
29304
29304
  return e.message;
29305
29305
  }).join('. ')));
29306
29306
  };
@@ -31910,7 +31910,8 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
31910
31910
  return /*#__PURE__*/React__default["default"].createElement(_FormControl__default["default"], {
31911
31911
  error: dirty && hasErrors,
31912
31912
  margin: "dense",
31913
- fullWidth: true
31913
+ fullWidth: true,
31914
+ required: required
31914
31915
  }, /*#__PURE__*/React__default["default"].createElement(SelectOrCreate, {
31915
31916
  loading: loading,
31916
31917
  label: label,
@@ -31941,7 +31942,7 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
31941
31942
  },
31942
31943
  onClose: abort,
31943
31944
  onChange: changeValue
31944
- }), dirty && hasErrors && /*#__PURE__*/React__default["default"].createElement(_FormHelperText__default["default"], null, errors.map(function (e) {
31945
+ }), dirty && !disabled && hasErrors && /*#__PURE__*/React__default["default"].createElement(_FormHelperText__default["default"], null, errors.map(function (e) {
31945
31946
  return e.message;
31946
31947
  }).join('. ')));
31947
31948
  };
package/dist/index.esm.js CHANGED
@@ -29231,7 +29231,7 @@ var FormControlField$1 = function FormControlField(_ref) {
29231
29231
  control: control,
29232
29232
  label: label,
29233
29233
  labelPlacement: finalProps.labelPlacement || 'end'
29234
- }), !isSwitch && !isRepeater && !isRender && control, dirty && hasErrors && /*#__PURE__*/React__default.createElement(_FormHelperText, null, errors.map(function (e) {
29234
+ }), !isSwitch && !isRepeater && !isRender && control, dirty && !disabled && hasErrors && /*#__PURE__*/React__default.createElement(_FormHelperText, null, errors.map(function (e) {
29235
29235
  return e.message;
29236
29236
  }).join('. ')));
29237
29237
  };
@@ -31841,7 +31841,8 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
31841
31841
  return /*#__PURE__*/React__default.createElement(_FormControl, {
31842
31842
  error: dirty && hasErrors,
31843
31843
  margin: "dense",
31844
- fullWidth: true
31844
+ fullWidth: true,
31845
+ required: required
31845
31846
  }, /*#__PURE__*/React__default.createElement(SelectOrCreate, {
31846
31847
  loading: loading,
31847
31848
  label: label,
@@ -31872,7 +31873,7 @@ var FormAutocomplete = function FormAutocomplete(_ref) {
31872
31873
  },
31873
31874
  onClose: abort,
31874
31875
  onChange: changeValue
31875
- }), dirty && hasErrors && /*#__PURE__*/React__default.createElement(_FormHelperText, null, errors.map(function (e) {
31876
+ }), dirty && !disabled && hasErrors && /*#__PURE__*/React__default.createElement(_FormHelperText, null, errors.map(function (e) {
31876
31877
  return e.message;
31877
31878
  }).join('. ')));
31878
31879
  };
package/firebase.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "hosting": {
3
+ "site": "react-formulator",
3
4
  "public": "storybook-static",
4
5
  "ignore": [
5
6
  "firebase.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scenid/react-formulator",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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",
@@ -46,6 +46,7 @@ const FormAutocomplete = ({
46
46
  error={dirty && hasErrors}
47
47
  margin="dense"
48
48
  fullWidth
49
+ required={required}
49
50
  >
50
51
  <SelectOrCreate
51
52
  loading={loading}
@@ -86,7 +87,7 @@ const FormAutocomplete = ({
86
87
  onChange={changeValue}
87
88
  />
88
89
  {
89
- (dirty && hasErrors)
90
+ (dirty && !disabled && hasErrors)
90
91
  && (
91
92
  <FormHelperText>
92
93
  {errors.map(e => e.message).join('. ')}
@@ -124,7 +124,7 @@ const FormControlField = ({
124
124
  && control
125
125
  }
126
126
  {
127
- (dirty && hasErrors)
127
+ (dirty && !disabled && hasErrors)
128
128
  && (
129
129
  <FormHelperText>
130
130
  {errors.map(e => e.message).join('. ')}