Customize Behavior
Add Custom Lists
You can add custom lists at two levels: a. on the CommentAnnotation and b. on the Comment.
1. Add Custom Lists on Comment Annotation
- Add a custom dropdown list at the Comment Annotation level.
- Use this to add custom tags or categories to the comment.
Using Props:
API Method:
2. Add Custom Lists on Comment
You can have custom dropdown lists appear when certain hotkeys
are pressed.
When you press a hotkey inside the Comment Dialog composer, it will open a dropdown list of items that you can select.
Selecting an item frop the dropdown list will add a chip that inside the comment text.
1
Set hotkey and list data
Make sure the hotkey is a single character such as
#
or /
- Create the list of data will be shown when the
hotkey
is pressed. Eg: When the user presses#
, the list of files or links from other parts of your app is shown. - The items in the list must be in the following schema:
Using Props:
API Method:
2
Listen to click event data on chips
- After the comment is saved, the item will be rendered as a chip on the comment content.
- When the user clicks on it, you will get an event callback with the data of the clicked chip (AutocompleteItem).
This event will also be triggered when the user clicks on the contact chips added via the @mentions feature.
Was this page helpful?