@rimelight/ui 0.0.35 → 0.0.36
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/package.json
CHANGED
|
@@ -112,14 +112,13 @@ const selectUi = {
|
|
|
112
112
|
class RLALocaleSelector extends HTMLElement {
|
|
113
113
|
connectedCallback() {
|
|
114
114
|
this.style.display = 'contents';
|
|
115
|
-
|
|
116
|
-
if (!hiddenInput) return;
|
|
117
|
-
|
|
118
|
-
hiddenInput.addEventListener('change', (event) => {
|
|
115
|
+
this.addEventListener('change', (event) => {
|
|
119
116
|
const target = event.target as HTMLInputElement;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
if (target && target.hasAttribute('data-select-hidden-input')) {
|
|
118
|
+
const targetUrl = target.value;
|
|
119
|
+
if (targetUrl) {
|
|
120
|
+
window.location.href = targetUrl;
|
|
121
|
+
}
|
|
123
122
|
}
|
|
124
123
|
});
|
|
125
124
|
}
|