pfNotificationDrawer
patternfly.notification
Component for rendering a notification drawer. This provides a common mechanism to handle how the notification
drawer should look and behave without mandating the look of the notification group heading or notification body.
Configuration Requirements:
.my-nav-container .drawer-pf {
height: calc(~"100vh - 46px");
top: 26px;
}
<pf-notification-drawer
drawer-hidden="{boolean}"
allow-expand="{boolean}"
drawer-expanded="{boolean}"
drawer-title="{string}"
notification-groups="{object}"
notification-track-field="{string}"
on-close="{function}"
show-mark-all-read="{boolean}"
on-mark-all-read="{function}"
show-clear-all="{boolean}"
on-clear-all="{function}"
action-button-title="{string}"
action-button-callback="{function}"
title-include="{string}"
heading-include="{string}"
subheading-include="{string}"
notification-body-include="{string}"
notification-footer-include="{string}"
no-notifications-text="{string}"
custom-scope="{object}">
</pf-notification-drawer>
| Param | Type | Details |
|---|---|---|
| drawerHidden | boolean | Flag if the drawer is currently hidden |
| allowExpand | boolean | Flag if the drawer can be expanded. Optional, default: false |
| drawerExpanded | boolean | Flag if the drawer is expanded (only valid if allowExpand is true). Optional, default: false |
| drawerTitle | string | Title to display for the drawer (leaving this blank will remove the provided expand capability) |
| notificationGroups | object | Collection notification groups to add to the drawer. Alternatively, a single group object can be given if categorization is not used. |
| notificationTrackField | string | Optional field from the notifications to use to track by in the notifications listing ($index used otherwise). |
| onClose | function | function() Callback for the close button. Close button is shown if this callback is supplied. Callback should set drawerHidden to true to close the drawer. |
| showMarkAllRead | boolean | Flag if the mark all read button should be shown, optional, default is false |
| onMarkAllRead | function | function(notificationGroup) Callback method for the mark all read button (Optional) |
| showClearAll | boolean | Flag if the clear all button should be shown, optional, default is false |
| onClearAll | function | function(notificationGroup) Callback method for the clear all button (Optional) |
| actionButtonTitle | string | Text for the lower action button of the drawer (optional, if not specified there will be no action button) |
| actionButtonCallback | function | function(notificationGroup) Callback method for action button for each group, the notificationGroup is passed (Optional) |
| titleInclude | string | Include src for the title area for the notification drawer, use this to customize the drawer title area |
| headingInclude | string | Include src for the heading area for each notification group, access the group via notificationGroup |
| subheadingInclude | string | Include src for the sub-heading area for each notification group, access the group via notificationGroup |
| notificationBodyInclude | string | Include src for the notification body for each notification, access the notification via notification |
| notificationFooterInclude | string | Include src for the notification footer for each notification, access the notification via notification |
| noNotificationsText | string | Text to show when there are no notifications. Optional. |
| customScope | object | Object containing any variables/functions used by the included src, access via $ctrl.customScope. |