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.modern.js
CHANGED
@@ -2672,6 +2672,10 @@ var TokenField = function TokenField(_ref) {
|
|
2672
2672
|
}
|
2673
2673
|
}
|
2674
2674
|
var tks = Array.isArray(tokens) ? tokens : [];
|
2675
|
+
var sortedOptions = options ? options.sort(function (a, b) {
|
2676
|
+
if (!a.label || !b.label) return 0;
|
2677
|
+
a.label.localeCompare(b.label);
|
2678
|
+
}) : null;
|
2675
2679
|
return /*#__PURE__*/React.createElement("div", {
|
2676
2680
|
className: "tokenField"
|
2677
2681
|
}, /*#__PURE__*/React.createElement("label", null, label), tks.map(function (text, index) {
|
@@ -2690,7 +2694,7 @@ var TokenField = function TokenField(_ref) {
|
|
2690
2694
|
});
|
2691
2695
|
}), options ? /*#__PURE__*/React.createElement(DropDown, {
|
2692
2696
|
onChange: changeDropDown,
|
2693
|
-
options:
|
2697
|
+
options: sortedOptions,
|
2694
2698
|
predictive: true,
|
2695
2699
|
verbose: false
|
2696
2700
|
}) : /*#__PURE__*/React.createElement("input", {
|