Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 82: | Line 82: | ||
field: 'dataSources', | field: 'dataSources', | ||
formatter: function (cell) { | formatter: function (cell) { | ||
const | const output = cell.getValue().reduce((prev, curr) => { | ||
const src = dataSources.find(src => src.name === curr); | |||
const url = src ? src.image : ''; | |||
return url ? prev + '<img class="data-source-img" src="' + url + '">' : prev + ' ' + curr; | |||
}, ''); | }, ''); | ||
return | return output; | ||
} | } | ||
} | } |
Revision as of 14:12, 7 June 2022
Development verstion of the DCT List.
Not ready for production!