Hi there,
Is there any built-in way to close a snackbar/notification bar if the user navigates to another page?
Or, if this isn't the right use case for the notification bar, could someone point me to a better one?
Thank you!
I know I need to define a specific style in package.json using:
"@progress/kendo-theme-default": "^6.3.0"
But I like to know if it is possible to target a specific style for a component. So (I realize this is maybe a weird question), component X uses the material theme and component Y the Bootstrap theme.
I am using your NotificationService in an NgRx effect by the way. So I would also be curious if this would be possible.
toast$ = createEffect(() =>
this.actions$.pipe(
ofType(CoreActions.Toast),
filter(({message}) => !!message),
tap(({message, messageType}) => {
this.currentNotification?.hide();
this.currentNotification = this.notificationService.show({
content: message,
hideAfter: 5000,
position: {horizontal: 'right', vertical: 'top'},
//animation: {type: 'fade', duration: 400}, //NOTE: Adding an animation unfortunately causes the toast to stack very shortly when using the 'hide()' function..
type: {style: messageType, icon: true},
closable: false //NOTE: If true the 'hideAfter' property is ignored
});
})
),
{dispatch: false} // Because only an action is done, we should not redispatch (that would cause an infinite dispatch loop of toasts)
);
Hi,
Is there a way to set the width of a notification to 100% of the available space?
The API documentation suggests I can achieve this using the cssClass property (https://www.telerik.com/kendo-angular-ui/components/notification/api/NotificationSettings/#toc-cssclass). I've tried adding width: 100% to the button-notification class in this fork of one of your examples: https://angular-btu63g.stackblitz.io but the notification width remains the same.
The width does change when I set an absolute value (e.g. width: 600px;).
But I can't predict what the available width will be and when the available space is less than the absolute value I set I get the following:
I want the notification to fill the entire available width (see below example from the Kendo website).
If I'm missing anything in the API documentation kindly point me in the right direction.
Hi
In your sample https://www.telerik.com/kendo-angular-ui/components/notification/types/ and https://6yuvdu--run.stackblitz.io on notification type, when i try to running sample Type is undefined ?
Error: src/app/app.component.ts:20:18 - error TS2304: Cannot find name 'Typе'.
Why
Regards
Hi,
I am using the notification in my footer section. With animation (fade or Slide) the animation append with an empty notification windows (so with 4-5px height) then when animation complete, the notification display the correct content. Same behaviours on FadeIn or FadeOut
I try with plain string in the content and with a test ngTemplate without any binding. Just plain text like in your sample.
Any idea?
Hi there,
We are having hard times to get our notifications right. Here is how our application works.
We have created a custom NotifcationService that abstracts notification for both desktops (Kendo UI) and mobiles (Ionic). Application components can trigger our NotificationService whenever needed. For instance, for the login page, we display a notification on error or success. Our notifications always have a title / header and a content message.
Kendo UI notification for Angular provides three different ways: string (doesn't allow html tags), TemplateRef and Component.
Type
'NotificationComponent'
is not assignable to type
'string | Function | TemplateRef<any>'
whereas passing NotificationComponent directly to NotificationSettings.content works well (but it is then not possible to pass input variables).
Are we missing something here? What would have been nice is either to:
Thanks
C.
My notifications are appearing underneath my grids. How do I get them to show up on top? Image demonstrating the problem is attached.