Skip to content

Commit 7c3f5a9

Browse files
danxuliubackportbot[bot]
authored andcommitted
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>
1 parent 380932c commit 7c3f5a9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apps/files/src/components/FileEntry.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<CustomElementRender
9999
:active-folder="activeFolder"
100100
:active-view="activeView"
101-
:render="column.render"
101+
:render="adaptColumnRenderToCustomElementRender(column)"
102102
:source="source" />
103103
</td>
104104
</tr>
@@ -299,6 +299,12 @@ export default defineComponent({
299299
view: this.activeView!,
300300
})
301301
},
302+
303+
adaptColumnRenderToCustomElementRender(column) {
304+
return ({ nodes, view }) => {
305+
return column.render(nodes[0], view)
306+
}
307+
},
302308
},
303309
})
304310
</script>

0 commit comments

Comments
 (0)