CommentOptions

Options for managing Comments and Comment Threads in AdapTable

TypeScript
export interface

Properties

PropertyTypeDescriptionDefault
dateFormatstring | (() => string)Date Format string for Comments timestamp'dd-MM-yyyy HH:mm:ss'
isCellCommentable(commentableCellContext:CommentableCellContext) => booleanFunction to configure if a cell can contain Comments
showCommentAction'hover' | 'menu'Whether to show Comments by hovering (default) or via context menu'hover'
showPopupCloseButtonbooleanShow the Close Button in the Comments Popuptrue

Methods

MethodReturnsDescription
loadCommentThreads(commentLoadContext)Promise<CommentThread[]>Loads the Comment Threads
persistCommentThreads(commentThreads)Promise<void>Persists the current Comment Threads

Property Details

dateFormat

Date Format string for Comments timestamp

TypeScript
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

TypeScript
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
Property Value

(commentableCellContext:CommentableCellContext) => boolean

showCommentAction

Whether to show Comments by hovering (default) or via context menu

TypeScript
showCommentAction?: 'hover' | 'menu';
Default Value

'hover'

Property Value

'hover' | 'menu'

showPopupCloseButton

Show the Close Button in the Comments Popup

TypeScript
showPopupCloseButton?: boolean;
Default Value

true

Property Value

boolean

Method Details

loadCommentThreads

Loads the Comment Threads

TypeScript
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
Parameters
ParameterType
commentLoadContextCommentLoadContext
Returns

Promise<CommentThread[]>

persistCommentThreads

Persists the current Comment Threads

TypeScript
persistCommentThreads?(commentThreads: CommentThread[]): Promise<void>;
Parameters
ParameterTypeDescription
commentThreadsCommentThread[]
Returns

Promise<void>