next-recomponents 1.4.3 → 1.4.4
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.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
- package/src/table/td.tsx +3 -1
package/dist/index.js
CHANGED
|
@@ -11184,11 +11184,11 @@ function TD(_a) {
|
|
|
11184
11184
|
}) }),
|
|
11185
11185
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: (item == null ? void 0 : item.handler) ? import_react23.default.Children.map(item.handler, (handler) => {
|
|
11186
11186
|
if (import_react23.default.isValidElement(handler)) {
|
|
11187
|
-
|
|
11188
|
-
|
|
11187
|
+
const _a3 = handler.props, { defaultValue } = _a3, restProps = __objRest(_a3, ["defaultValue"]);
|
|
11188
|
+
return import_react23.default.cloneElement(handler, __spreadProps(__spreadValues({}, restProps), {
|
|
11189
11189
|
value: mapedData[index][item.name].content,
|
|
11190
11190
|
onChange: (e) => {
|
|
11191
|
-
var
|
|
11191
|
+
var _a4, _b3;
|
|
11192
11192
|
const nmd = [...mapedData];
|
|
11193
11193
|
nmd[index][item.name].content = e.target.value;
|
|
11194
11194
|
e.item = Object.assign(
|
|
@@ -11205,9 +11205,9 @@ function TD(_a) {
|
|
|
11205
11205
|
setMapedData == null ? void 0 : setMapedData(nmd2);
|
|
11206
11206
|
};
|
|
11207
11207
|
setMapedData == null ? void 0 : setMapedData(nmd);
|
|
11208
|
-
(_b3 = (
|
|
11208
|
+
(_b3 = (_a4 = handler == null ? void 0 : handler.props) == null ? void 0 : _a4.onChange) == null ? void 0 : _b3.call(_a4, e);
|
|
11209
11209
|
}
|
|
11210
|
-
});
|
|
11210
|
+
}));
|
|
11211
11211
|
}
|
|
11212
11212
|
return handler;
|
|
11213
11213
|
}) : item == null ? void 0 : item.content })
|
package/dist/index.mjs
CHANGED
|
@@ -11173,11 +11173,11 @@ function TD(_a) {
|
|
|
11173
11173
|
}) }),
|
|
11174
11174
|
/* @__PURE__ */ jsx8("div", { children: (item == null ? void 0 : item.handler) ? React3.Children.map(item.handler, (handler) => {
|
|
11175
11175
|
if (React3.isValidElement(handler)) {
|
|
11176
|
-
|
|
11177
|
-
|
|
11176
|
+
const _a3 = handler.props, { defaultValue } = _a3, restProps = __objRest(_a3, ["defaultValue"]);
|
|
11177
|
+
return React3.cloneElement(handler, __spreadProps(__spreadValues({}, restProps), {
|
|
11178
11178
|
value: mapedData[index][item.name].content,
|
|
11179
11179
|
onChange: (e) => {
|
|
11180
|
-
var
|
|
11180
|
+
var _a4, _b3;
|
|
11181
11181
|
const nmd = [...mapedData];
|
|
11182
11182
|
nmd[index][item.name].content = e.target.value;
|
|
11183
11183
|
e.item = Object.assign(
|
|
@@ -11194,9 +11194,9 @@ function TD(_a) {
|
|
|
11194
11194
|
setMapedData == null ? void 0 : setMapedData(nmd2);
|
|
11195
11195
|
};
|
|
11196
11196
|
setMapedData == null ? void 0 : setMapedData(nmd);
|
|
11197
|
-
(_b3 = (
|
|
11197
|
+
(_b3 = (_a4 = handler == null ? void 0 : handler.props) == null ? void 0 : _a4.onChange) == null ? void 0 : _b3.call(_a4, e);
|
|
11198
11198
|
}
|
|
11199
|
-
});
|
|
11199
|
+
}));
|
|
11200
11200
|
}
|
|
11201
11201
|
return handler;
|
|
11202
11202
|
}) : item == null ? void 0 : item.content })
|
package/package.json
CHANGED
package/src/table/td.tsx
CHANGED
|
@@ -77,8 +77,10 @@ export default function TD({
|
|
|
77
77
|
{item?.handler
|
|
78
78
|
? React.Children.map(item.handler, (handler) => {
|
|
79
79
|
if (React.isValidElement(handler)) {
|
|
80
|
+
const { defaultValue, ...restProps } = handler.props;
|
|
81
|
+
|
|
80
82
|
return React.cloneElement(handler as any, {
|
|
81
|
-
|
|
83
|
+
...restProps,
|
|
82
84
|
value: mapedData[index][item.name].content,
|
|
83
85
|
onChange: (e: any) => {
|
|
84
86
|
const nmd = [...mapedData];
|