@kaspernj/api-maker 1.0.413 → 1.0.414
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/package.json +1 -1
- package/src/table/column-content.jsx +13 -9
package/package.json
CHANGED
|
@@ -9,12 +9,15 @@ export default class ApiMakerTableColumnContent {
|
|
|
9
9
|
this.column = column
|
|
10
10
|
this.mode = mode
|
|
11
11
|
this.model = model
|
|
12
|
-
this.modelCallbackArgs = modelCallbackArgs(table, model)
|
|
13
12
|
this.table = table
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
columnContentFromContentArg(
|
|
17
|
-
const
|
|
15
|
+
columnContentFromContentArg() {
|
|
16
|
+
const args = modelCallbackArgs(this.table, this.model)
|
|
17
|
+
|
|
18
|
+
args.mode = this.mode
|
|
19
|
+
|
|
20
|
+
const value = this.column.content(args)
|
|
18
21
|
|
|
19
22
|
return this.presentColumnValue(value)
|
|
20
23
|
}
|
|
@@ -60,12 +63,10 @@ export default class ApiMakerTableColumnContent {
|
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
content() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (column.content) {
|
|
66
|
-
return this.
|
|
67
|
-
} else if (!column.content && column.attribute) {
|
|
68
|
-
return this.columnsContentFromAttributeAndPath(column, model)
|
|
66
|
+
if (this.column.content) {
|
|
67
|
+
return this.columnContentFromContentArg()
|
|
68
|
+
} else if (!this.column.content && this.column.attribute) {
|
|
69
|
+
return this.columnsContentFromAttributeAndPath()
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
@@ -90,6 +91,9 @@ export default class ApiMakerTableColumnContent {
|
|
|
90
91
|
|
|
91
92
|
} else if (typeof value == "string") {
|
|
92
93
|
contentText = value
|
|
94
|
+
} else {
|
|
95
|
+
// Its a React node - just return it and trust the provider to be HTML compatible.
|
|
96
|
+
return value
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
if (this.mode == "html") {
|