mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: Fix rendering custom columns in file lists
CustomElementRender is used to render both IFileActions and IColumns. However, the API to render both of them is different, and currently CustomElementRender passes the arguments expected by IFileAction. Fortunately those arguments are a superset of those expected by IColumn, so they can be adapted when a CustomElementRender is used to render an IColumn. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
380932cc78
commit
7c3f5a9c10
1 changed files with 7 additions and 1 deletions
|
|
@ -98,7 +98,7 @@
|
|||
<CustomElementRender
|
||||
:active-folder="activeFolder"
|
||||
:active-view="activeView"
|
||||
:render="column.render"
|
||||
:render="adaptColumnRenderToCustomElementRender(column)"
|
||||
:source="source" />
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -299,6 +299,12 @@ export default defineComponent({
|
|||
view: this.activeView!,
|
||||
})
|
||||
},
|
||||
|
||||
adaptColumnRenderToCustomElementRender(column) {
|
||||
return ({ nodes, view }) => {
|
||||
return column.render(nodes[0], view)
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue