@smilodon/core 1.9.1 → 1.9.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/README.md +14 -0
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +7 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6071,6 +6071,10 @@ class EnhancedSelect extends HTMLElement {
|
|
|
6071
6071
|
continue;
|
|
6072
6072
|
const sourceValue = source[key];
|
|
6073
6073
|
const targetValue = result[key];
|
|
6074
|
+
// Optional adapter props are commonly forwarded as undefined. Preserve
|
|
6075
|
+
// the existing/default config in that case instead of erasing a section.
|
|
6076
|
+
if (sourceValue === undefined)
|
|
6077
|
+
continue;
|
|
6074
6078
|
if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {
|
|
6075
6079
|
result[key] = this._mergeConfig(targetValue && typeof targetValue === 'object' ? targetValue : {}, sourceValue);
|
|
6076
6080
|
}
|
|
@@ -6112,8 +6116,9 @@ class EnhancedSelect extends HTMLElement {
|
|
|
6112
6116
|
const hasSomethingToClear = (clearSelection && hasSelection) || (clearSearch && hasSearch);
|
|
6113
6117
|
const hideWhenEmpty = this._config.clearControl.hideWhenEmpty !== false;
|
|
6114
6118
|
const visible = enabled && (!hideWhenEmpty || hasSomethingToClear);
|
|
6115
|
-
|
|
6116
|
-
this.
|
|
6119
|
+
// Reserve the action area only while the clear control is actually visible.
|
|
6120
|
+
this._inputContainer.classList.toggle('has-clear-control', visible);
|
|
6121
|
+
this._arrowContainer.classList.toggle('with-clear-control', visible);
|
|
6117
6122
|
this._clearControl.hidden = !visible;
|
|
6118
6123
|
this._clearControl.disabled = !hasSomethingToClear;
|
|
6119
6124
|
this._clearControl.setAttribute('aria-hidden', String(!visible));
|