ywana-core8 0.0.166 → 0.0.170
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 +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +19 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +15 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +15 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +1 -4
- package/src/html/textfield-outlined.css +6 -0
- package/src/html/textfield.css +13 -0
- package/src/html/textfield.js +6 -1
package/dist/index.cjs
CHANGED
@@ -863,6 +863,8 @@ var TextField = function TextField(props) {
|
|
863
863
|
outlined = props.outlined,
|
864
864
|
_props$readOnly = props.readOnly,
|
865
865
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
866
|
+
_props$canClear = props.canClear,
|
867
|
+
canClear = _props$canClear === void 0 ? true : _props$canClear,
|
866
868
|
onChange = props.onChange,
|
867
869
|
onEnter = props.onEnter,
|
868
870
|
onClick = props.onClick;
|
@@ -891,6 +893,10 @@ var TextField = function TextField(props) {
|
|
891
893
|
}
|
892
894
|
}
|
893
895
|
|
896
|
+
function clear() {
|
897
|
+
if (onChange) onChange(id, "");
|
898
|
+
}
|
899
|
+
|
894
900
|
var borderStyle = outlined ? "textfield-outlined" : "textfield";
|
895
901
|
var labelStyle = label ? "" : "no-label";
|
896
902
|
var style = labelStyle + " " + borderStyle;
|
@@ -908,7 +914,12 @@ var TextField = function TextField(props) {
|
|
908
914
|
onKeyDown: onKeyPress,
|
909
915
|
onFocus: focus,
|
910
916
|
readOnly: readOnly
|
911
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
917
|
+
}), canClear ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
918
|
+
icon: "close",
|
919
|
+
clickable: true,
|
920
|
+
size: "small",
|
921
|
+
action: clear
|
922
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement("span", {
|
912
923
|
className: "bar"
|
913
924
|
}), label ? /*#__PURE__*/React__default["default"].createElement("label", null, labelTxt) : null);
|
914
925
|
};
|
@@ -4243,13 +4254,13 @@ var TablePage = function TablePage(props) {
|
|
4243
4254
|
|
4244
4255
|
function renderActions() {
|
4245
4256
|
return actions.map(function (element) {
|
4246
|
-
console.log("renderActions", element.props, pageContext);
|
4247
|
-
|
4248
4257
|
var action = function action() {
|
4249
4258
|
return element.props.action(pageContext);
|
4250
4259
|
};
|
4251
4260
|
|
4252
|
-
var clone = React__default["default"].cloneElement(element,
|
4261
|
+
var clone = React__default["default"].cloneElement(element, {
|
4262
|
+
action: action
|
4263
|
+
});
|
4253
4264
|
return clone;
|
4254
4265
|
});
|
4255
4266
|
}
|