Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,17 @@ Sentry.init({
Sentry.feedbackIntegration({
onFormOpen: () => {},
onFormClose: () => {},
onSubmitSuccess: (data: FeedbackFormData) => {},
onSubmitSuccess: (data: FeedbackFormData, eventID: string) => {},
onSubmitError: (error: Error) => {},
}),
],
});
```

You can link directly to a saved feedback item by implementing the `onSubmitSuccess` callback. The url you need to construct is `https://\$\{orgSlug}.sentry.io/issues/feedback/?projectSlug=\$\{projectSlug}&eventId=\$\{eventId}`.

*Note:* In v9 and below of the SDK the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`.

### Bring Your Own Button

You can use your own button instead of the default injected button to trigger the form being displayed, by calling `feedback.attachTo()` to have the SDK attach a click listener to your button. You can also supply the same customization options that the constructor accepts (for example, for text labels and colors).
Expand Down