CommentOptions
Comments on cells. A thread is the list of comments for one cell.
Comments are not stored in AdapTable State. The application loads them with and saves them with .
export interfaceProperties
| Property | Type | Description | Default |
|---|---|---|---|
| dateFormat | string | (() => string) | Date Format string for Comments timestamp | 'dd-MM-yyyy HH:mm:ss' |
| isCellCommentable | (commentableCellContext:CommentableCellContext) => boolean | Function to configure if a cell can contain Comments | |
| showCommentAction | 'hover' | 'menu' | Whether to show Comments by hovering (default) or via context menu | 'hover' |
| showPopupCloseButton | boolean | Show the Close Button in the Comments Popup | true |
Methods
| Method | Returns | Description |
|---|---|---|
| loadCommentThreads(commentLoadContext) | Promise<CommentThread[]> | Loads every comment thread when the grid starts. |
| persistCommentThreads(commentThreads) | Promise<void> | Saves the threads after a comment is added, edited or deleted. Called with the full set, not only the thread that changed. |
Property Details
dateFormat
Date Format string for Comments timestamp
dateFormat?: string | (() => string);Default Value
'dd-MM-yyyy HH:mm:ss'
Property Value
string | (() => string)
isCellCommentable
Function to configure if a cell can contain Comments
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;Property Value
(commentableCellContext:CommentableCellContext) => boolean
showCommentAction
Whether to show Comments by hovering (default) or via context menu
showCommentAction?: 'hover' | 'menu';Default Value
'hover'
Property Value
'hover' | 'menu'
showPopupCloseButton
Show the Close Button in the Comments Popup
showPopupCloseButton?: boolean;Default Value
true
Property Value
boolean
Method Details
loadCommentThreads
Loads every comment thread when the grid starts.
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;Parameters
| Parameter | Type | Description |
|---|---|---|
| commentLoadContext | CommentLoadContext | The grid the comments belong to |
Returns
The threads to show. An empty list when there are none
Promise<CommentThread[]>
persistCommentThreads
Saves the threads after a comment is added, edited or deleted.
Called with the full set, not only the thread that changed.
persistCommentThreads?(commentThreads: CommentThread[]): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| commentThreads | CommentThread[] | Every thread, including the one that just changed |
Returns
Promise<void>