I've used the following code successfully to put general conditions on the number of selected items in a list/library control e.g:
dt.$watch('selectedItems', function(items) {
pdfButton.visible = items && items.length >= 1 ;
});
What I want to be able to do is control the visibility depending on a field in each item (Content Type) -
Is it possible to do this using the $watch function - something like:
dt.$watch('selectedItems', function(items) {
items.forEach(function(item){
if (item.ContentType === 'Document' )
{
item.pdfButton.visible = true;
}
});
});
Is this possible?
Regards
Andy