@prof-dev/improved-select
Advanced tools
Comparing version 1.1.13 to 1.1.14
@@ -54,3 +54,3 @@ import { EventEmitter } from "@prof-dev/event-emitter"; | ||
private resetSearchState; | ||
updateOptions(): void; | ||
updateOptions(triggerChange?: boolean): void; | ||
info(): ImprovedSelectInfo; | ||
@@ -57,0 +57,0 @@ private update; |
@@ -395,10 +395,13 @@ "use strict"; | ||
}; | ||
ImprovedSelect.prototype.updateOptions = function () { | ||
ImprovedSelect.prototype.updateOptions = function (triggerChange) { | ||
var _a; | ||
if (triggerChange === void 0) { triggerChange = true; } | ||
this.linkedOptions = Array.from(this.element.querySelectorAll("[data-select-option]")); | ||
this.initLinkedOptions(); | ||
this.updateDefaultSelection(); | ||
(_a = this.select) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new Event("change", { | ||
bubbles: true, | ||
})); | ||
if (triggerChange === true) { | ||
(_a = this.select) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new Event("change", { | ||
bubbles: true, | ||
})); | ||
} | ||
}; | ||
@@ -405,0 +408,0 @@ ImprovedSelect.prototype.info = function () { |
{ | ||
"name": "@prof-dev/improved-select", | ||
"version": "1.1.13", | ||
"version": "1.1.14", | ||
"description": "Helper for live clicks events management", | ||
@@ -5,0 +5,0 @@ "main": "lib/ImprovedSelect.js", |
@@ -328,3 +328,3 @@ import { EventEmitter } from "@prof-dev/event-emitter"; | ||
public updateOptions() { | ||
public updateOptions(triggerChange: boolean = true) { | ||
this.linkedOptions = Array.from( | ||
@@ -338,7 +338,9 @@ this.element.querySelectorAll("[data-select-option]"), | ||
this.select?.dispatchEvent( | ||
new Event("change", { | ||
bubbles: true, | ||
}), | ||
); | ||
if (triggerChange === true) { | ||
this.select?.dispatchEvent( | ||
new Event("change", { | ||
bubbles: true, | ||
}), | ||
); | ||
} | ||
} | ||
@@ -345,0 +347,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91125
1615