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.umd.js
CHANGED
@@ -860,6 +860,8 @@
|
|
860
860
|
outlined = props.outlined,
|
861
861
|
_props$readOnly = props.readOnly,
|
862
862
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
863
|
+
_props$canClear = props.canClear,
|
864
|
+
canClear = _props$canClear === void 0 ? true : _props$canClear,
|
863
865
|
onChange = props.onChange,
|
864
866
|
onEnter = props.onEnter,
|
865
867
|
onClick = props.onClick;
|
@@ -888,6 +890,10 @@
|
|
888
890
|
}
|
889
891
|
}
|
890
892
|
|
893
|
+
function clear() {
|
894
|
+
if (onChange) onChange(id, "");
|
895
|
+
}
|
896
|
+
|
891
897
|
var borderStyle = outlined ? "textfield-outlined" : "textfield";
|
892
898
|
var labelStyle = label ? "" : "no-label";
|
893
899
|
var style = labelStyle + " " + borderStyle;
|
@@ -905,7 +911,12 @@
|
|
905
911
|
onKeyDown: onKeyPress,
|
906
912
|
onFocus: focus,
|
907
913
|
readOnly: readOnly
|
908
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
914
|
+
}), canClear ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
915
|
+
icon: "close",
|
916
|
+
clickable: true,
|
917
|
+
size: "small",
|
918
|
+
action: clear
|
919
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement("span", {
|
909
920
|
className: "bar"
|
910
921
|
}), label ? /*#__PURE__*/React__default["default"].createElement("label", null, labelTxt) : null);
|
911
922
|
};
|
@@ -4240,13 +4251,13 @@
|
|
4240
4251
|
|
4241
4252
|
function renderActions() {
|
4242
4253
|
return actions.map(function (element) {
|
4243
|
-
console.log("renderActions", element.props, pageContext);
|
4244
|
-
|
4245
4254
|
var action = function action() {
|
4246
4255
|
return element.props.action(pageContext);
|
4247
4256
|
};
|
4248
4257
|
|
4249
|
-
var clone = React__default["default"].cloneElement(element,
|
4258
|
+
var clone = React__default["default"].cloneElement(element, {
|
4259
|
+
action: action
|
4260
|
+
});
|
4250
4261
|
return clone;
|
4251
4262
|
});
|
4252
4263
|
}
|