Closed trsrm closed 9 years ago
The message can be closed by clicking on any point inside it
Also you can use replaceMessage option to show only one new message in a time or if you need to close specific message programmatically see #16
Even though we can close by clicking on it, having a close button has it's pros.
We can show the user a more intuitive way to close the notification. Or even disable 'close' function when clicking anywhere and only close when clicking on a 'X' button.
I think it could improve usability.
I also think the feature would be very useful. For example, I need to let the user select and copy text from the pop-up. For this, I want to have control over pop-up closing, that is the case for such button and possibly an API call.
Any way it is closing on click so.I did like below.
Showing one close icon with out any functionality.
Notification.error({message:' error',title:'Info <i class="glyphicon glyphicon-remove-circle pull-right" style="cursor: pointer;font-size: large;margin-top: -5px" ></i>',delay: 10000});
A close button indicates an action which is just friendlier for UX in general. Even if you have to zero-in on a little button instead of the whole popup, there's no confusion. I don't think it should replace the current model, but be a secondary option. Also, I would like to be able to have them easily copy the text if needed (which might be a good place for a 1-click copy button) since the error notif may show stack trace info and that requires some clicking around.
Hi guys,
just ran into the same issue (needing a close button). To achieve this you just have to add your custom template and inside that html add your button like this: <button type="button" class="close" ng-click="kill(true);">×\<\/button>
the kill is referenced in the documentation as a way to remove a notification. Hope this helps someone, Cheers.
Please, implement option to show "Close" button. Thanks.