ywana-core8 0.0.977 → 0.0.979
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 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/tokenfield.js +4 -4
package/dist/index.umd.js
CHANGED
@@ -2639,6 +2639,8 @@
|
|
2639
2639
|
tokens = _ref$tokens === void 0 ? [] : _ref$tokens,
|
2640
2640
|
readOnly = _ref.readOnly,
|
2641
2641
|
options = _ref.options,
|
2642
|
+
_ref$predictive = _ref.predictive,
|
2643
|
+
predictive = _ref$predictive === void 0 ? true : _ref$predictive,
|
2642
2644
|
onChange = _ref.onChange;
|
2643
2645
|
var _useState = React.useState(),
|
2644
2646
|
value = _useState[0],
|
@@ -2674,10 +2676,10 @@
|
|
2674
2676
|
}
|
2675
2677
|
}
|
2676
2678
|
var tks = Array.isArray(tokens) ? tokens : [];
|
2677
|
-
var sortedOptions = options ? options.
|
2679
|
+
var sortedOptions = options ? options.toSorted(function (a, b) {
|
2678
2680
|
if (!a.label || !b.label) return 0;
|
2679
2681
|
try {
|
2680
|
-
a.label.localeCompare(b.label);
|
2682
|
+
return a.label + "".localeCompare(b.label + "");
|
2681
2683
|
} catch (error) {
|
2682
2684
|
console.log('Error sorting options', error, a, b);
|
2683
2685
|
return 0;
|
@@ -2702,7 +2704,7 @@
|
|
2702
2704
|
}), options ? /*#__PURE__*/React__default["default"].createElement(DropDown, {
|
2703
2705
|
onChange: changeDropDown,
|
2704
2706
|
options: sortedOptions,
|
2705
|
-
predictive:
|
2707
|
+
predictive: predictive,
|
2706
2708
|
verbose: false
|
2707
2709
|
}) : /*#__PURE__*/React__default["default"].createElement("input", {
|
2708
2710
|
type: "text",
|