Improve this doc View source

pfToastNotificationList
directive in module patternfly.notification

Description

Using this component displayes a list of toast notifications

Usage

as element:
<pf-toast-notification-list
       notifications="{Array}"
       show-close="{Boolean}"
       close-callback="{function}"
       update-viewing="{function}">
</pf-toast-notification-list>

Directive info

  • This directive creates new scope.

Parameters

ParamTypeDetails
notificationsArray

The list of current notifications to display. Each notification should have the following (see pfToastNotification):

  • .type - (String) The type of the notification message. Allowed value is one of these: 'success','info','danger', 'warning'
  • .header - (String) The header to display for the notification (optional)
  • .message - (String) The main text message of the notification.
  • .actionTitle Text to show for the primary action, optional.
  • .actionCallback (function(this notification)) Function to invoke when primary action is selected, optional
  • .menuActions Optional list of actions to place in the kebab menu:
    • .name - (String) The name of the action, displayed on the button
    • .actionFn - (function(action, this notification)) Function to invoke when the action selected
    • .isDisabled - (Boolean) set to true to disable the action
    • .isSeparator - (Boolean) set to true if this is a placehodler for a separator rather than an action
  • .isPersistent Flag to show close button for the notification even if showClose is false.
showCloseBoolean

Flag to show the close button on all notifications (not shown if the notification has menu actions)

closeCallbackfunction

(function(data)) Function to invoke when closes a toast notification

updateViewingfunction

(function(boolean, data)) Function to invoke when user is viewing/not-viewing (hovering on) a toast notification

Example

Source





Demo