diff --git a/zero.Backoffice.UI/app/schemas/list/list-column.ts b/zero.Backoffice.UI/app/schemas/list/list-column.ts
index 8932d0d3..ce3ee1bb 100644
--- a/zero.Backoffice.UI/app/schemas/list/list-column.ts
+++ b/zero.Backoffice.UI/app/schemas/list/list-column.ts
@@ -195,14 +195,15 @@ class ListColumn
/**
* Output an image by using the value media ID
+ * @param {function} [titleFunc] - Custom function to render a title
* @returns {ListColumn}
*/
- image()
+ image(titleFunc: any = null)
{
this._type = 'image';
this._asHtml = true;
- // TODO correct app ID
- this._func = (value, opts) =>
+ this._funcOptions = { titleFunc };
+ this._func = (value, opts, model) =>
{
let id = value;
@@ -216,7 +217,9 @@ class ListColumn
return '';
}
- return `
`;
+ let title = typeof opts.titleFunc == 'function' ? opts.titleFunc(value, model) : '';
+
+ return `
`;
};
return this;
}
diff --git a/zero.Backoffice.UI/index.html b/zero.Backoffice.UI/index.html
index eebbc9dd..1090f954 100644
--- a/zero.Backoffice.UI/index.html
+++ b/zero.Backoffice.UI/index.html
@@ -20,7 +20,7 @@
-
+