Skip to content

🐛 Bug Report: onNotificationClick not working when using renderNotification #8955

@juanpablob

Description

@juanpablob

📜 Description

Whenever you're using a custom component to render your notification via renderNotification prop on either <InboxContent /> or <Notifications />, the onNotificationClick prop / event doesn't work at all!

👟 Reproduction steps

Literally take this very example of Novu's documentation: https://docs.novu.co/platform/inbox/react/components/inbox-content#advanced-usage and try it by yourself.

👍 Expected behavior

It should either:

  • Return a onClick when using renderNotification so you can pass it down to your custom notification component
  • Or attach the onNotificationClick to the onClick event of the passed custom notification component (or override it, if you will)

👎 Actual Behavior with Screenshots

Actual behavior is that whenever I'm using a custom notification component via renderNotification, the onNotificationClick doesn't work at all, and all that renderNotification returns is a function where you can grab only the notification object, nothing else.

Novu version

Novu SaaS

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions