[OutSystems UI] Bug - Notification component

Forge Component
(69)
Published on 25 Nov (11 days ago) by OutSystems R&D
69 votes
Published on 25 Nov (11 days ago) by OutSystems R&D
Processing Upload...

Hi,

The OutsystemsUI Notification component in Reactive has a problem when you try to close the notification you have to click two times to close it.

The Notification component has an action OnNotificationClose were the the action OpenCloseNotification is called which sets the IsNotificationOpen to it's opposite value and in the OnNotificationClose then is set the variable IsNotificationOpen to false, already going against what was done before. After that the OnClose event is triggered and if the developer is using that event(which I am) to control a variable to know if the notification is open it then will change the input parameter isOpen which will trigger the OnParameterChanged which in this case calls OpenCloseNotification which will set IsNotificationOpen to it's opposite.

The solution that I tested for this is to remove in the OnNotificationClose the call to the action OpenCloseNotification and remove the set of IsNotificationOpen to false. 

After this change it works has intended.


Here is a gif with our example bug were we have to click two times.

Here the component in the Outsystems patterns with bug too https://outsystemsui.outsystems.com/OutSystemsUIWebsite/PatternDetail?PatternId=53


There is another thing that should be addressed, in the javascript every time the OpenCloseNotification action is called addEventListener are added but never removed when the animation ends and can cause memory leaks.

Thanks,

Paulo Borges Miranda