mig-schema-table 3.0.48 → 3.0.49

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.
@@ -92,6 +92,7 @@ function Td({ checkedIndexes, disabledCheckedIndexes, columnIndex, data, getRowC
92
92
  if (!propSchema) {
93
93
  return null;
94
94
  }
95
+ const propValue = row[propName];
95
96
  switch (propSchema.type) {
96
97
  case "boolean":
97
98
  tdDivProps.className += ` text-${(propConfig === null || propConfig === void 0 ? void 0 : propConfig.align) || "center"}`;
@@ -104,7 +105,12 @@ function Td({ checkedIndexes, disabledCheckedIndexes, columnIndex, data, getRowC
104
105
  if (propConfig === null || propConfig === void 0 ? void 0 : propConfig.align) {
105
106
  tdDivProps.className += ` text-${propConfig.align}`;
106
107
  }
108
+ if (propSchema.format === "url" && propValue) {
109
+ return (
110
+ // @ts-ignore
111
+ _jsx("a", Object.assign({ href: propValue, target: "_blank", rel: "noopener noreferrer" }, tdDivProps, { children: propValue })));
112
+ }
107
113
  }
108
- return _jsx("div", Object.assign({}, tdDivProps, { children: row[propName] }));
114
+ return _jsx("div", Object.assign({}, tdDivProps, { children: propValue }));
109
115
  }
110
116
  export default React.memo(Td);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mig-schema-table",
3
- "version": "3.0.48",
3
+ "version": "3.0.49",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/"