@bbl-digital/snorre 3.0.8 → 3.0.11

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.
@@ -38,8 +38,6 @@ const useAutocomplete = props => {
38
38
  const onFuzzyBlur = e => {
39
39
  // If the value of the input is changed, and does not match the value of the values array,
40
40
  // we should revert back the input value to the original value
41
- //What
42
- // if (!e.target.value.length) clearSelectedItem()
43
41
  if (e.target.value === props.value) return; // If target value is the same as a value from the values array, we should set the value for the user
44
42
 
45
43
  if (inputValues?.length) {
@@ -50,10 +48,7 @@ const useAutocomplete = props => {
50
48
  setValueChanged(val);
51
49
  handleValueClick(valueInInputValues);
52
50
  return;
53
- } // Otherwise we should return to the original input value
54
-
55
-
56
- setValueChanged(props.value ?? '');
51
+ }
57
52
  }
58
53
  };
59
54
 
@@ -60,8 +60,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(({
60
60
  return _jsxs(_Fragment, {
61
61
  children: [_jsxs("label", {
62
62
  ref: inputWrapperRef,
63
- css: theme => [styles.default(theme), (props.invalid || props.invalidMessage) && styles.invalid(theme), props.validation && styles.validation, props.onLabelClick && styles.clickableLabel, height && styles.height(height), css && css],
64
63
  onClick: props.onLabelClick ? e => e.preventDefault() : undefined,
64
+ css: theme => [styles.default(theme), (props.invalid || props.invalidMessage) && styles.invalid(theme), props.validation && styles.validation, props.onLabelClick && styles.clickableLabel, height && styles.height(height), css && css],
65
65
  children: [_jsxs("span", {
66
66
  css: styles.label,
67
67
  children: [props.label && (props.onLabelClick ? _jsx(Link, {