ywana-core8 0.0.139 → 0.0.140
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 +23 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +23 -11
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +23 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/textfield.js +12 -12
package/dist/index.umd.js
CHANGED
@@ -978,14 +978,28 @@
|
|
978
978
|
setOpen(false);
|
979
979
|
}
|
980
980
|
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
981
|
+
function renderOptions() {
|
982
|
+
var canShow = open == true && Array.isArray(options);
|
983
|
+
|
984
|
+
if (canShow) {
|
985
|
+
var filterActive = canFilter && label && label.length > 0;
|
986
|
+
var items = filterActive ? options.filter(function (option) {
|
987
|
+
return canFilter === false || filter.toUpperCase().indexOf(option.label.toUpperCase()) >= 0;
|
988
|
+
}) : options;
|
989
|
+
var lis = items.map(function (option) {
|
990
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
991
|
+
key: option.value,
|
992
|
+
value: option.value
|
993
|
+
}, option.label);
|
994
|
+
});
|
995
|
+
return /*#__PURE__*/React__default["default"].createElement("menu", null, /*#__PURE__*/React__default["default"].createElement("ul", {
|
996
|
+
onClick: select
|
997
|
+
}, lis));
|
998
|
+
} else {
|
999
|
+
return null;
|
1000
|
+
}
|
1001
|
+
}
|
1002
|
+
|
989
1003
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
990
1004
|
className: "dropdown"
|
991
1005
|
}, /*#__PURE__*/React__default["default"].createElement(TextField, _extends({}, props, {
|
@@ -997,9 +1011,7 @@
|
|
997
1011
|
clickable: true,
|
998
1012
|
size: "small",
|
999
1013
|
action: toggle
|
1000
|
-
}),
|
1001
|
-
onClick: select
|
1002
|
-
}, items)) : null);
|
1014
|
+
}), renderOptions());
|
1003
1015
|
};
|
1004
1016
|
|
1005
1017
|
var isFunction$1 = function isFunction(value) {
|