jQWidgets Forums
jQuery UI Widgets › Forums › Angular › jqxNotification -> render() doesn't work properly
This topic contains 5 replies, has 2 voices, and was last updated by Liam 7 years, 1 month ago.
-
Author
-
Hello, I’ve got the following problem. When I call a render() method of jqxNotification component it doubles the notification message.
Code for reproduction :app.component.html
<jqxNotification #msgNotification [position]="'top-right'" [opacity]="0.9" [autoOpen]="false" [autoClose]="true" [closeOnClick]="true" [animationOpenDelay]="800" [autoCloseDelay]="4000" > <div id="notification-text"> Initial text </div> </jqxNotification> <input type="button" value="Click on me few times" (click)="onClick()">
app.component.ts
export class AppComponent { @ViewChild('msgNotification') msgNotification: jqxNotificationComponent; onClick() { document.getElementById('notification-text').innerText = 'new text'; this.msgNotification.theme('error'); this.msgNotification.render(); this.msgNotification.open(); } }
I must use render() method because of [theme] is not changing.
Thank you !
Hello, I’m sorry I provided a bit wrong example. Please ignore my previous example.
The problem is : when changing a template() at runtime in jqxNotification component, it doubles notification message.
Providing working example to reproduce :app.component.html
<jqxNotification #msgNotification [position]="'top-right'" [opacity]="0.9" [autoOpen]="false" [autoClose]="true" [closeOnClick]="true" [animationOpenDelay]="800" [autoCloseDelay]="4000" > <div id="notification-text"> Initial text </div> </jqxNotification> <input type="button" value="Click on me few times" (click)="onClick()">
app.component.ts
export class AppComponent { @ViewChild('msgNotification') msgNotification: jqxNotificationComponent; onClick() { this.msgNotification.template(this.msgNotification.template() === 'info' ? 'error' : 'info'); this.msgNotification.open(); } }
Thank you !
Hello Liam,
Thank you for the report!
I have some questions:
1) What version of jqWidgets are you using?
2) What is the version of angular?
3) On what browsers are you using for your project?Best Regards,
StanislavjQWidgets Team
http://www.jqwidgets.com/Hello, I use the following :
jqwidgets-scripts: 5.5.0
@angular/core: 5.2.9
Chrome 65.0.3325.181Thank you !
Hello Liam,
Thanks for the report again.
This shouldn’t be happening, and unfortunately, I am unable to give you a workaround for the time being.A fix should be released in the near future.
Best Regards,
StanislavjQWidgets Team
http://www.jqwidgets.com/Hello, as a workaround I created two jqxNotification components. The first with ‘info’ template and the second with ‘error’ template.
Hope it will be fixed.
Thank you ! -
AuthorPosts
You must be logged in to reply to this topic.