ywana-core8 0.0.973 → 0.0.975
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/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/tokenfield.js +7 -2
package/dist/index.umd.js
CHANGED
@@ -2674,6 +2674,10 @@
|
|
2674
2674
|
}
|
2675
2675
|
}
|
2676
2676
|
var tks = Array.isArray(tokens) ? tokens : [];
|
2677
|
+
var sortedOptions = options ? options.sort(function (a, b) {
|
2678
|
+
if (!a.label || !b.label) return 0;
|
2679
|
+
a.label.localeCompare(b.label);
|
2680
|
+
}) : null;
|
2677
2681
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
2678
2682
|
className: "tokenField"
|
2679
2683
|
}, /*#__PURE__*/React__default["default"].createElement("label", null, label), tks.map(function (text, index) {
|
@@ -2692,7 +2696,7 @@
|
|
2692
2696
|
});
|
2693
2697
|
}), options ? /*#__PURE__*/React__default["default"].createElement(DropDown, {
|
2694
2698
|
onChange: changeDropDown,
|
2695
|
-
options:
|
2699
|
+
options: sortedOptions,
|
2696
2700
|
predictive: true,
|
2697
2701
|
verbose: false
|
2698
2702
|
}) : /*#__PURE__*/React__default["default"].createElement("input", {
|