Skip to content

Commit 65ff5f8

Browse files
committed
Fixed �ddOptions() method is select component
1 parent 29c2a5c commit 65ff5f8

6 files changed

Lines changed: 16 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
+ [x] Fixed `parsePhone()` utility function
44
+ [x] Added support for custom nodes in ListView
5-
+ [x] Added support for custom nodes in TreeView
5+
+ [x] Fixed `addOptions()` method is `select` component

lib/metro.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
99

1010
* Metro UI v5.1.20 Components Library (https://metroui.org.ua)
11-
* Build: 18.10.2025, 19:16:45
11+
* Build: 19.10.2025, 14:27:19
1212
* Copyright 2012-2025 by Serhii Pimenov
1313
* Licensed under MIT
1414
*/
@@ -11497,7 +11497,7 @@
1149711497
(($7) => {
1149811498
"use strict";
1149911499
globalThis["__version__"] = "5.1.20";
11500-
globalThis["__build_time__"] = "18.10.2025, 19:16:45";
11500+
globalThis["__build_time__"] = "19.10.2025, 14:27:19";
1150111501
const meta_init = $7.meta("metro:init").attr("content");
1150211502
const meta_cloak = $7.meta("metro:cloak").attr("content");
1150311503
const meta_cloak_duration = $7.meta("metro:cloak_duration").attr("content");
@@ -11844,7 +11844,7 @@
1184411844
const normalizeComponentName2 = (name2) => typeof name2 !== "string" ? void 0 : name2.replace(/-/g, "").toLowerCase();
1184511845
const Metro2 = {
1184611846
version: "5.1.20",
11847-
build_time: "18.10.2025, 19:16:45",
11847+
build_time: "19.10.2025, 14:27:19",
1184811848
buildNumber: 0,
1184911849
isTouchable: isTouch3,
1185011850
fullScreenEnabled: document.fullscreenEnabled,
@@ -22952,6 +22952,7 @@
2295222952
return this;
2295322953
},
2295422954
addOptions: function(values) {
22955+
const element2 = this.element;
2295522956
const that = this;
2295622957
if (!values) {
2295722958
return this;
@@ -22971,7 +22972,7 @@
2297122972
});
2297222973
}
2297322974
this._createOptions();
22974-
this.observer.observe(element[0], {
22975+
this.observer.observe(element2[0], {
2297522976
childList: true,
2297622977
subtree: true
2297722978
});
@@ -26460,6 +26461,8 @@ ${err.message}`);
2646026461
info: info_icon,
2646126462
warning: warning_icon,
2646226463
caution: caution_icon,
26464+
alert: caution_icon,
26465+
error: caution_icon,
2646326466
tip: tip_icon,
2646426467
success: success_icon
2646526468
};
@@ -44650,7 +44653,7 @@ ${err.message}`);
4465044653
const o2 = this.options;
4465144654
const nodes = element2.find("li[data-caption]");
4465244655
element2.addClass("treeview");
44653-
$7.each(nodes, (i3, _el) => {
44656+
$7.each(nodes, (_5, _el) => {
4465444657
const el = $7(_el);
4465544658
if (el.data("type") === "checkbox" || el.data("type") === "radio") {
4465644659
this._createCheckNode(
@@ -44679,7 +44682,6 @@ ${err.message}`);
4467944682
},
4468044683
el
4468144684
);
44682-
} else if (el.children().length > 0) {
4468344685
} else {
4468444686
this._createNode(
4468544687
{

lib/metro.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/components/directive/directive.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
info: info_icon,
5353
warning: warning_icon,
5454
caution: caution_icon,
55+
alert: caution_icon,
56+
error: caution_icon,
5557
tip: tip_icon,
5658
success: success_icon,
5759
};

source/components/select/select.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@
802802
},
803803

804804
addOptions: function (values) {
805+
const element = this.element;
805806
const that = this;
806807

807808
if (!values) {

source/components/treeview/treeview.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257

258258
element.addClass("treeview");
259259

260-
$.each(nodes, (i, _el) => {
260+
$.each(nodes, (_, _el) => {
261261
const el = $(_el);
262262

263263
if (el.data("type") === "checkbox" || el.data("type") === "radio") {
@@ -287,8 +287,6 @@
287287
},
288288
el,
289289
);
290-
} else if (el.children().length > 0) {
291-
// Do nothing, custom node data
292290
} else {
293291
this._createNode(
294292
{

0 commit comments

Comments
 (0)