CommentApi
Provides run-time access to Comment Module and related State
TypeScript
export interfaceMethods
| Method | Description |
|---|---|
| addComment(commentText, cellAddress) | Add a Comment to a Comment Thread |
| addCommentThread(commentThread) | Create a new Comment Thread |
| clearComments() | Clear all Comment Threads in the grid |
| deleteComment(comment, cellAddress) | Delete a Comment |
| deleteCommentThread(cellAddress) | Delete all Comments for a particular cell |
| editComment(comment, cellAddress) | Edit a Comment |
| getAllComments() | Return all Comment Threads in the grid |
| getCommentThreadForCell(cellAddress) | Return the Comment Thread for a particular cell |
| hideCommentsPopup() | Close the Comment Popup |
| setComments(commentThreads) | Sets the Comment Threads in the grid |
Method Details
addComment
Add a Comment to a Comment Thread
TypeScript
addComment(commentText: string, cellAddress: CellAddress): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| commentText | string | |
| cellAddress | CellAddress | cell where comment is added |
Returns
void
addCommentThread
Create a new Comment Thread
TypeScript
addCommentThread(commentThread: CommentThread): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| commentThread | CommentThread |
Returns
void
clearComments
Clear all Comment Threads in the grid
TypeScript
clearComments(): void;Returns
void
deleteComment
Delete a Comment
TypeScript
deleteComment(comment: AdaptableComment, cellAddress: CellAddress): void;Parameters
| Parameter | Type |
|---|---|
| comment | AdaptableComment |
| cellAddress | CellAddress |
Returns
void
deleteCommentThread
Delete all Comments for a particular cell
TypeScript
deleteCommentThread(cellAddress: CellAddress): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| cellAddress | CellAddress |
Returns
void
editComment
Edit a Comment
TypeScript
editComment(comment: AdaptableComment, cellAddress?: CellAddress): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| comment | AdaptableComment | Comment to edit |
| cellAddress | CellAddress | Location of the comment, if not provided all comments will be traversed to find the comment |
Returns
void
getAllComments
Return all Comment Threads in the grid
TypeScript
getAllComments(): CommentThread[];Returns
getCommentThreadForCell
Return the Comment Thread for a particular cell
TypeScript
getCommentThreadForCell(cellAddress: CellAddress): CommentThread | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| cellAddress | CellAddress |
Returns
CommentThread | undefined
hideCommentsPopup
Close the Comment Popup
TypeScript
hideCommentsPopup(): void;Returns
void
setComments
Sets the Comment Threads in the grid
TypeScript
setComments(commentThreads: CommentThread[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| commentThreads | CommentThread[] | new cell comments |
Returns
void