Skip to content

pf-notification-drawer cannot take an object for notificationGroups #429

Closed
@benjaminapetersen

Description

@benjaminapetersen

Its pretty common to be able to pass an array or an object as an arg, but the pf-notification-drawer will only accept an array:

scope.$watch('notificationGroups', function () {
 var openFound = false;
 // this line demands that notificationGroups be an array :(
 scope.notificationGroups.forEach(function (group) {
   if (group.open) {
     if (openFound) {
       group.open = false;
     } else {
       openFound = true;
     }
   }
 });
});

Using a utility like angular.forEach would provide some helpful flexibility & eliminate the need for glue code to swap objects and arrays back and forth.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions