ztxkui 1.3.7 → 1.3.8

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.
@@ -99,7 +99,11 @@ var TableEnhanceCell = memo(function (_a) {
99
99
  var createEditableDom = function (editableConfig) {
100
100
  if (!editableConfig) {
101
101
  return (React.createElement(Form.Item, { className: "zt-table__enhance-cell", name: dataIndex },
102
- React.createElement(Input, { autoComplete: "new-password", maxLength: 50, onPressEnter: save, onBlur: save, allowClear: true })));
102
+ React.createElement(Input, { autoComplete: "new-password", maxLength: 50, onPressEnter: save, onBlur: save, allowClear: true, onChange: function (e) {
103
+ if (!e.target.value) {
104
+ e.target.focus();
105
+ }
106
+ } })));
103
107
  }
104
108
  var type = editableConfig.type, data = editableConfig.data, keyValue = editableConfig.keyValue, maxHandle = editableConfig.maxHandle, minHandle = editableConfig.minHandle, editableProps = __rest(editableConfig, ["type", "data", "keyValue", "maxHandle", "minHandle"]);
105
109
  var selectData = data; // 下拉框使用到得数据
@@ -130,11 +134,19 @@ var TableEnhanceCell = memo(function (_a) {
130
134
  }
131
135
  else if (type === 'textArea') {
132
136
  return (React.createElement(Form.Item, { className: "zt-table__enhance-cell", name: dataIndex },
133
- React.createElement(Input.TextArea, __assign({ autoComplete: "new-password", maxLength: 200, autoSize: { maxRows: 3 } }, editableProps, { onPressEnter: save, onBlur: save, allowClear: true }))));
137
+ React.createElement(Input.TextArea, __assign({ autoComplete: "new-password", maxLength: 200, autoSize: { maxRows: 3 } }, editableProps, { onPressEnter: save, onBlur: save, onChange: function (e) {
138
+ if (!e.target.value) {
139
+ e.target.focus();
140
+ }
141
+ }, allowClear: true }))));
134
142
  }
135
143
  else {
136
144
  return (React.createElement(Form.Item, { className: "zt-table__enhance-cell", name: dataIndex },
137
- React.createElement(Input, __assign({ autoComplete: "new-password", maxLength: 50 }, editableProps, { onPressEnter: save, onBlur: save, allowClear: true }))));
145
+ React.createElement(Input, __assign({ autoComplete: "new-password", maxLength: 50 }, editableProps, { onPressEnter: save, onBlur: save, allowClear: true, onChange: function (e) {
146
+ if (!e.target.value) {
147
+ e.target.focus();
148
+ }
149
+ } }))));
138
150
  }
139
151
  };
140
152
  var childNode = children;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",