Allow to fetch recursive metadata from pages in tables
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6c260e654d
commit
27200abc58
|
@ -274,11 +274,15 @@ function Editor(holder, input) {
|
||||||
el("td", [renderInline(rowText)]),
|
el("td", [renderInline(rowText)]),
|
||||||
..._.map(header.children, col => {
|
..._.map(header.children, col => {
|
||||||
let td = el("td")
|
let td = el("td")
|
||||||
let value = rowData[_.snakeCase(_.trim(col.text))];
|
let key = _.trim(col.text);
|
||||||
|
let value = _.get(rowData, key)
|
||||||
|
if (_.isObject(value) && value.line) {
|
||||||
|
value = value.line
|
||||||
|
}
|
||||||
if (col.children && col.children.length > 0) {
|
if (col.children && col.children.length > 0) {
|
||||||
value = col.children[0].text
|
value = col.children[0].text
|
||||||
}
|
}
|
||||||
transform(value ? value.replace(/^:/, '=') : '', $(td), id, editor, rowData)
|
transform(typeof value === 'string' ? value.replace(/^:/, '=') : '', $(td), id, editor, rowData)
|
||||||
return td
|
return td
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user