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:
Daniel Calviño Sánchez 2026-05-04 11:28:12 +02:00 committed by backportbot[bot]
parent 380932cc78
commit 7c3f5a9c10

View file

@ -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>