Fix help message not displaying for mixed library type

This commit is contained in:
Bill Thornton 2022-02-22 16:20:57 -05:00
parent fb090f239b
commit 11fdd8a487

View file

@ -87,12 +87,11 @@ import template from './mediaLibraryCreator.template.html';
if (index != -1) {
const name = this.options[index].innerHTML.replace('*', '').replace('&', '&');
$('#txtValue', dlg).val(name);
const folderOption = collectionTypeOptions.filter(i => {
return i.value == value;
})[0];
$('.collectionTypeFieldDescription', dlg).html(folderOption.message || '');
}
}
const folderOption = collectionTypeOptions.find(i => i.value === value);
$('.collectionTypeFieldDescription', dlg).html(folderOption?.message || '');
});
page.querySelector('.btnAddFolder').addEventListener('click', onAddButtonClick);
page.querySelector('.btnSubmit').addEventListener('click', onAddLibrary);