next-recomponents 1.4.4 → 1.4.5

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 CHANGED
@@ -11184,8 +11184,9 @@ 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
- const _a3 = handler.props, { defaultValue } = _a3, restProps = __objRest(_a3, ["defaultValue"]);
11188
- return import_react23.default.cloneElement(handler, __spreadProps(__spreadValues({}, restProps), {
11187
+ const { type, props: props2 } = handler;
11188
+ const _a3 = props2, { defaultValue } = _a3, otherProps = __objRest(_a3, ["defaultValue"]);
11189
+ return import_react23.default.createElement(type, __spreadProps(__spreadValues({}, otherProps), {
11189
11190
  value: mapedData[index][item.name].content,
11190
11191
  onChange: (e) => {
11191
11192
  var _a4, _b3;
package/dist/index.mjs CHANGED
@@ -11173,8 +11173,9 @@ 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
- const _a3 = handler.props, { defaultValue } = _a3, restProps = __objRest(_a3, ["defaultValue"]);
11177
- return React3.cloneElement(handler, __spreadProps(__spreadValues({}, restProps), {
11176
+ const { type, props: props2 } = handler;
11177
+ const _a3 = props2, { defaultValue } = _a3, otherProps = __objRest(_a3, ["defaultValue"]);
11178
+ return React3.createElement(type, __spreadProps(__spreadValues({}, otherProps), {
11178
11179
  value: mapedData[index][item.name].content,
11179
11180
  onChange: (e) => {
11180
11181
  var _a4, _b3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/table/td.tsx CHANGED
@@ -77,10 +77,11 @@ 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;
80
+ const { type, props } = handler;
81
+ const { defaultValue, ...otherProps } = props;
81
82
 
82
- return React.cloneElement(handler as any, {
83
- ...restProps,
83
+ return React.createElement(type, {
84
+ ...otherProps,
84
85
  value: mapedData[index][item.name].content,
85
86
  onChange: (e: any) => {
86
87
  const nmd = [...mapedData];