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.cjs
CHANGED
@@ -2681,6 +2681,10 @@ var TokenField = function TokenField(_ref) {
|
|
2681
2681
|
}
|
2682
2682
|
}
|
2683
2683
|
var tks = Array.isArray(tokens) ? tokens : [];
|
2684
|
+
var sortedOptions = options ? options.sort(function (a, b) {
|
2685
|
+
if (!a.label || !b.label) return 0;
|
2686
|
+
a.label.localeCompare(b.label);
|
2687
|
+
}) : null;
|
2684
2688
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
2685
2689
|
className: "tokenField"
|
2686
2690
|
}, /*#__PURE__*/React__default["default"].createElement("label", null, label), tks.map(function (text, index) {
|
@@ -2699,7 +2703,7 @@ var TokenField = function TokenField(_ref) {
|
|
2699
2703
|
});
|
2700
2704
|
}), options ? /*#__PURE__*/React__default["default"].createElement(DropDown, {
|
2701
2705
|
onChange: changeDropDown,
|
2702
|
-
options:
|
2706
|
+
options: sortedOptions,
|
2703
2707
|
predictive: true,
|
2704
2708
|
verbose: false
|
2705
2709
|
}) : /*#__PURE__*/React__default["default"].createElement("input", {
|