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.modern.js
CHANGED
@@ -974,14 +974,28 @@ var DropDown = function DropDown(props) {
|
|
974
974
|
setOpen(false);
|
975
975
|
}
|
976
976
|
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
977
|
+
function renderOptions() {
|
978
|
+
var canShow = open == true && Array.isArray(options);
|
979
|
+
|
980
|
+
if (canShow) {
|
981
|
+
var filterActive = canFilter && label && label.length > 0;
|
982
|
+
var items = filterActive ? options.filter(function (option) {
|
983
|
+
return canFilter === false || filter.toUpperCase().indexOf(option.label.toUpperCase()) >= 0;
|
984
|
+
}) : options;
|
985
|
+
var lis = items.map(function (option) {
|
986
|
+
return /*#__PURE__*/React.createElement("li", {
|
987
|
+
key: option.value,
|
988
|
+
value: option.value
|
989
|
+
}, option.label);
|
990
|
+
});
|
991
|
+
return /*#__PURE__*/React.createElement("menu", null, /*#__PURE__*/React.createElement("ul", {
|
992
|
+
onClick: select
|
993
|
+
}, lis));
|
994
|
+
} else {
|
995
|
+
return null;
|
996
|
+
}
|
997
|
+
}
|
998
|
+
|
985
999
|
return /*#__PURE__*/React.createElement("div", {
|
986
1000
|
className: "dropdown"
|
987
1001
|
}, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
|
@@ -993,9 +1007,7 @@ var DropDown = function DropDown(props) {
|
|
993
1007
|
clickable: true,
|
994
1008
|
size: "small",
|
995
1009
|
action: toggle
|
996
|
-
}),
|
997
|
-
onClick: select
|
998
|
-
}, items)) : null);
|
1010
|
+
}), renderOptions());
|
999
1011
|
};
|
1000
1012
|
|
1001
1013
|
var isFunction$1 = function isFunction(value) {
|