@bbl-digital/snorre 3.0.8 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +20 -25
- package/esm/core/Autocomplete/hooks/useAutocomplete.js +1 -6
- package/esm/core/Autocomplete/index.js +1 -1
- package/esm/core/Autocomplete/styles.js +18 -18
- package/lib/core/Autocomplete/hooks/useAutocomplete.d.ts.map +1 -1
- package/lib/core/Autocomplete/hooks/useAutocomplete.js +1 -6
- package/lib/core/Autocomplete/index.js +1 -1
- package/lib/core/Autocomplete/styles.d.ts.map +1 -1
- package/lib/core/Autocomplete/styles.js +18 -18
- package/package.json +1 -1
@@ -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
|
-
}
|
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, {
|