@portnet/ui 0.0.50 → 0.0.52

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.
@@ -66,7 +66,12 @@ const PuiStandardAutocomplete = /*#__PURE__*/React.forwardRef((_ref, ref) => {
66
66
  } = _ref,
67
67
  rest = _objectWithoutProperties(_ref, _excluded);
68
68
  const handleChange = (event, option) => {
69
- onChange(getOptionValue(option));
69
+ onChange(option !== null ? getOptionValue(option) : null);
70
+ };
71
+ const inputChangeHandler = (event, newInputValue, reason) => {
72
+ if (reason === "clear") {
73
+ onChange(null);
74
+ }
70
75
  };
71
76
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Autocomplete, _objectSpread({
72
77
  ref: ref,
@@ -91,6 +96,7 @@ const PuiStandardAutocomplete = /*#__PURE__*/React.forwardRef((_ref, ref) => {
91
96
  clearIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Clear.default, {
92
97
  fontSize: "small"
93
98
  }),
99
+ onInputChange: inputChangeHandler,
94
100
  popupIcon: loading || disabled || readOnly ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDropDown.default, {}),
95
101
  PaperComponent: _ref2 => {
96
102
  let {
@@ -183,12 +189,6 @@ const PuiFormikAutocomplete = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
183
189
  setSelectedOption(option);
184
190
  onChange(option);
185
191
  };
186
- const inputChangeHandler = (event, newInputValue, reason) => {
187
- if (reason === "clear") {
188
- formikContext.setFieldValue(name, "");
189
- setSelectedOption(null);
190
- }
191
- };
192
192
  React.useEffect(() => {
193
193
  setHasError(Boolean(meta) && Boolean(meta.touched) && Boolean(meta.error));
194
194
  }, [meta]);
@@ -243,8 +243,7 @@ const PuiFormikAutocomplete = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
243
243
  onChange: changeHandler,
244
244
  getOptionKey: getOptionKey,
245
245
  getOptionLabel: getOptionLabel,
246
- getOptionValue: option => option,
247
- onInputChange: inputChangeHandler
246
+ getOptionValue: option => option
248
247
  }, rest));
249
248
  });
250
249
  const PuiAutocomplete = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
@@ -16,7 +16,7 @@ const PuiLoadingBackdrop = _ref => {
16
16
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
17
17
  sx: {
18
18
  color: "#fff",
19
- zIndex: 10
19
+ zIndex: 9999
20
20
  },
21
21
  open: open,
22
22
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portnet/ui",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "description": "Portnet UI",
5
5
  "keywords": [
6
6
  "react",