Description
We have the ReduxToastr component at the root of our app with preventDuplicates
props set to true:
<ReduxToastr
timeOut={0}
position="top-right"
transitionIn="fadeIn"
transitionOut="fadeOut"
preventDuplicates={true}
/>
We fire toastr add action (by using a @ReduxToastr/toastr/ADD
type Redux action) with the following payload in the app (I've made some changes to demonstrate that the message and title and type are definitely the same on all the toastrs we create):
id: getRandomId(), // a function to create a random id, we use this because react-redux-toastr will keep track of the id internally for closing via CustomToastrButton which we need for aria-labels and closing modals with the ESC button
message: 'Aislinn is testing',
options: {
timeOut: 5000,
icon: <NotificationSuccessLge />,
removeOnHover: false,
showCloseButton: false,
component: <CustomToastrButton toastMsgId="toast.closeSuccessToast" />,
preventDuplicates: true,
},
position: 'top-right',
title: 'Aislinn is still testing',
type: 'success',
preventDuplicates doesn't work for us with these settings. I had a look at the source code for preventDuplication https://github.com/diegoddox/react-redux-toastr/search?q=prevent+duplicates&unscoped_q=prevent+duplicates and I figured having the same message/title/and type should be enough for this. Is there something else I'm missing?
The version of react-redux-toastr we're using is "5.0.7"
- a little bit out of date but preventDuplicates should work on that.