@shoper/phoenix_design_system 1.18.7-5 → 1.18.7-7
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.
|
@@ -287,7 +287,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
287
287
|
_addPlaceholderOptionIfNeeded() {
|
|
288
288
|
if (!this._canAddPlaceholder)
|
|
289
289
|
return;
|
|
290
|
-
const $placeholderOption = this.
|
|
290
|
+
const $placeholderOption = this._createPlaceholderOption();
|
|
291
291
|
this._injectOptionIntoDOM($placeholderOption);
|
|
292
292
|
this._updateOptions();
|
|
293
293
|
}
|
|
@@ -301,7 +301,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
301
301
|
const hasExistingPlaceholder = !!this.querySelector('h-option[placeholder]');
|
|
302
302
|
return !hasExistingPlaceholder;
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
_createPlaceholderOption() {
|
|
305
305
|
const $option = document.createElement('h-option');
|
|
306
306
|
$option.setAttribute('value', '');
|
|
307
307
|
$option.setAttribute('selected', 'true');
|
|
@@ -56,7 +56,7 @@ export declare class HSelect extends PhoenixLightLitElement {
|
|
|
56
56
|
private _getOptions;
|
|
57
57
|
private _addPlaceholderOptionIfNeeded;
|
|
58
58
|
private get _canAddPlaceholder();
|
|
59
|
-
private
|
|
59
|
+
private _createPlaceholderOption;
|
|
60
60
|
private _injectOptionIntoDOM;
|
|
61
61
|
private _setupEvents;
|
|
62
62
|
private _handleOptionDeselect;
|
|
@@ -283,7 +283,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
283
283
|
_addPlaceholderOptionIfNeeded() {
|
|
284
284
|
if (!this._canAddPlaceholder)
|
|
285
285
|
return;
|
|
286
|
-
const $placeholderOption = this.
|
|
286
|
+
const $placeholderOption = this._createPlaceholderOption();
|
|
287
287
|
this._injectOptionIntoDOM($placeholderOption);
|
|
288
288
|
this._updateOptions();
|
|
289
289
|
}
|
|
@@ -297,7 +297,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
297
297
|
const hasExistingPlaceholder = !!this.querySelector('h-option[placeholder]');
|
|
298
298
|
return !hasExistingPlaceholder;
|
|
299
299
|
}
|
|
300
|
-
|
|
300
|
+
_createPlaceholderOption() {
|
|
301
301
|
const $option = document.createElement('h-option');
|
|
302
302
|
$option.setAttribute('value', '');
|
|
303
303
|
$option.setAttribute('selected', 'true');
|