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.cjs
CHANGED
@@ -981,14 +981,28 @@ var DropDown = function DropDown(props) {
|
|
981
981
|
setOpen(false);
|
982
982
|
}
|
983
983
|
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
984
|
+
function renderOptions() {
|
985
|
+
var canShow = open == true && Array.isArray(options);
|
986
|
+
|
987
|
+
if (canShow) {
|
988
|
+
var filterActive = canFilter && label && label.length > 0;
|
989
|
+
var items = filterActive ? options.filter(function (option) {
|
990
|
+
return canFilter === false || filter.toUpperCase().indexOf(option.label.toUpperCase()) >= 0;
|
991
|
+
}) : options;
|
992
|
+
var lis = items.map(function (option) {
|
993
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
994
|
+
key: option.value,
|
995
|
+
value: option.value
|
996
|
+
}, option.label);
|
997
|
+
});
|
998
|
+
return /*#__PURE__*/React__default["default"].createElement("menu", null, /*#__PURE__*/React__default["default"].createElement("ul", {
|
999
|
+
onClick: select
|
1000
|
+
}, lis));
|
1001
|
+
} else {
|
1002
|
+
return null;
|
1003
|
+
}
|
1004
|
+
}
|
1005
|
+
|
992
1006
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
993
1007
|
className: "dropdown"
|
994
1008
|
}, /*#__PURE__*/React__default["default"].createElement(TextField, _extends({}, props, {
|
@@ -1000,9 +1014,7 @@ var DropDown = function DropDown(props) {
|
|
1000
1014
|
clickable: true,
|
1001
1015
|
size: "small",
|
1002
1016
|
action: toggle
|
1003
|
-
}),
|
1004
|
-
onClick: select
|
1005
|
-
}, items)) : null);
|
1017
|
+
}), renderOptions());
|
1006
1018
|
};
|
1007
1019
|
|
1008
1020
|
var isFunction$1 = function isFunction(value) {
|