oolib 2.203.0 → 2.203.1
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.
|
@@ -25,6 +25,7 @@ var getAllOptionsFns_1 = require("./getAllOptionsFns");
|
|
|
25
25
|
// }
|
|
26
26
|
var getValue_SINGLE = function (_a) {
|
|
27
27
|
var _b;
|
|
28
|
+
var _c;
|
|
28
29
|
var valueProp = _a.valueProp, optionsFn = _a.optionsFn, options = _a.options, theme = _a.theme, saveValueAsString = _a.saveValueAsString;
|
|
29
30
|
if (!saveValueAsString)
|
|
30
31
|
return valueProp;
|
|
@@ -33,7 +34,7 @@ var getValue_SINGLE = function (_a) {
|
|
|
33
34
|
// For grouped data, search through all options in all groups
|
|
34
35
|
for (var _i = 0, allOptions_1 = allOptions; _i < allOptions_1.length; _i++) {
|
|
35
36
|
var group = allOptions_1[_i];
|
|
36
|
-
var found = group.options.find(function (d) { return d.value === valueProp; });
|
|
37
|
+
var found = (_c = group.options) === null || _c === void 0 ? void 0 : _c.find(function (d) { return d.value === valueProp; });
|
|
37
38
|
if (found)
|
|
38
39
|
return found;
|
|
39
40
|
}
|
|
@@ -41,7 +42,7 @@ var getValue_SINGLE = function (_a) {
|
|
|
41
42
|
}
|
|
42
43
|
else {
|
|
43
44
|
// For normal data, search directly
|
|
44
|
-
return allOptions.find(function (d) { return d.value === valueProp; });
|
|
45
|
+
return allOptions === null || allOptions === void 0 ? void 0 : allOptions.find(function (d) { return d.value === valueProp; });
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
exports.getValue_SINGLE = getValue_SINGLE;
|
|
@@ -55,9 +56,10 @@ var getValue_MULTI = function (_a) {
|
|
|
55
56
|
if ((0, List_1.isGroupedData)(allOptions)) {
|
|
56
57
|
// For grouped data, map each value and search through all options in all groups
|
|
57
58
|
return valueProp.map(function (vProp) {
|
|
59
|
+
var _a;
|
|
58
60
|
for (var _i = 0, allOptions_2 = allOptions; _i < allOptions_2.length; _i++) {
|
|
59
61
|
var group = allOptions_2[_i];
|
|
60
|
-
var found = group.options.find(function (d) { return d.value === vProp; });
|
|
62
|
+
var found = (_a = group.options) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.value === vProp; });
|
|
61
63
|
if (found)
|
|
62
64
|
return found;
|
|
63
65
|
}
|
|
@@ -67,7 +69,7 @@ var getValue_MULTI = function (_a) {
|
|
|
67
69
|
else {
|
|
68
70
|
// For normal data, map directly
|
|
69
71
|
return valueProp.map(function (vProp) {
|
|
70
|
-
return allOptions.find(function (d) { return d.value === vProp; });
|
|
72
|
+
return allOptions === null || allOptions === void 0 ? void 0 : allOptions.find(function (d) { return d.value === vProp; });
|
|
71
73
|
}).filter(Boolean); // Remove any undefined values
|
|
72
74
|
}
|
|
73
75
|
};
|