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
Copy file name to clipboardExpand all lines: README.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,6 +196,19 @@ store.addNotification({
196
196
})
197
197
```
198
198
199
+
#### Subscribe to notification's removal
200
+
201
+
Easily subscribe to `onRemoval` by supplying callback as option to the notification object. Callback will get called after the removal animation finishes.
202
+
203
+
```js
204
+
store.addNotification({
205
+
...notification,
206
+
onRemoval: (id, removedBy) => {
207
+
...
208
+
}
209
+
})
210
+
```
211
+
199
212
#### Pause notification's timeout by hovering
200
213
201
214
```js
@@ -264,11 +277,6 @@ store.addNotification({
264
277
<td><code>Array</code></td>
265
278
<td>Custom types</td>
266
279
</tr>
267
-
<tr>
268
-
<td><code>onNotificationRemoval</code></td>
269
-
<td><code>Function</code></td>
270
-
<td>Gets called on notification removal with <code>id</code> and <code>removedBy</code> arguments</td>
271
-
</tr>
272
280
</table>
273
281
274
282
## Options
@@ -284,6 +292,11 @@ store.addNotification({
284
292
<td><code>String</code></td>
285
293
<td>Id of the notification. Supply option only if you prefer to have custom id, otherwise you should let the component handle generation for you.</td>
286
294
</tr>
295
+
<tr>
296
+
<td><code>onRemoval</code></td>
297
+
<td><code>Function</code></td>
298
+
<td>Gets called on notification removal with <code>id</code> and <code>removedBy</code> arguments</td>
0 commit comments