puranjayjain / react-materialui-notifications

Spec compliant notifications for react and material ui users
https://puranjayjain.github.io/react-materialui-notifications/
MIT License
251 stars 36 forks source link

Remove notifications fix #129

Closed DevAlien closed 7 years ago

DevAlien commented 7 years ago

Hi, I've added a couple of features.

First of all I made that when you remove a notification it actually disappears from the dom, it gets delete from the notifications array. This is needed because if an app is running for hours then you could have thousands notifications in background, in your DOM, which is not good.

The second thing I've added is a way to click the notification, or disable the clicking, since I noticed that the list was not disabled so it seemed you could click it. Instead of that I did that if you pass an onClick it will be clicked and once you click the notification will also disappear while if you don't pass an onClick the list will be disabled so it won't look like you can click on it.

puranjayjain commented 7 years ago

@DevAlien wow 😆 that was fast I'll review these changes and make a release with them

puranjayjain commented 7 years ago

on an initial read seems fine will test and get back to you on this 🥂

DevAlien commented 7 years ago

@puranjayjain is this released on npm?

puranjayjain commented 7 years ago

its not released yet.