You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<cds-actionable-notification [notificationObj]="{ inline: true, type: 'error', title: 'Error: Unable to procees your request this time.', actionsTemplate: customActionableTrigger, message: 'Please try again later', showClose:true, lowContrast: true, }" (close)="onNotificationClose()" > </cds-actionable-notification>
I need such default behaviour as close that component on 'x' click.
My onNotificationClose() method is beeing properly invoked on 'x' click.
How can I achieve it ?
Should I somehow register notification component created in template in NotificationService ? NotificationDisplayService exposes close() method but it accepts ComponentRef. Does this mean that I should create that notification using ComponentResolverFactory ? Or there is some simple solution that I'm missing.
The text was updated successfully, but these errors were encountered:
Hi @placzkowskim, To implement such functionality- When the user will click on close icon of the actionable notification, Then your method which you written should invoke, Fix is required in actionable-notification file.
Please assign this issue to me, I will fix it and would raise PR.
nipun005
added a commit
to nipun005/carbon-components-angular
that referenced
this issue
Oct 27, 2023
After merging of this PR, On Click of X button of ActionableNotification, "onNotificationClose()" method will automaticaaly be invoked if you check with above code again that you used previously, and you would not be needed to use any other approach like- ComponentResolverFactory or something.
Hi, if you would like to close the notification. I highly recommend using the notification service to dynamically render your component. The component will be dynamically removed on x click. We have quite a few examples of this in our storybook:
ActionableNotification close button action.
Hi I have created actionable notification like:
<cds-actionable-notification [notificationObj]="{ inline: true, type: 'error', title: 'Error: Unable to procees your request this time.', actionsTemplate: customActionableTrigger, message: 'Please try again later', showClose:true, lowContrast: true, }" (close)="onNotificationClose()" > </cds-actionable-notification>
I need such default behaviour as close that component on 'x' click.
My onNotificationClose() method is beeing properly invoked on 'x' click.
How can I achieve it ?
Should I somehow register notification component created in template in NotificationService ?
NotificationDisplayService
exposesclose()
method but it accepts ComponentRef. Does this mean that I should create that notification using ComponentResolverFactory ? Or there is some simple solution that I'm missing.The text was updated successfully, but these errors were encountered: