# CommentOptions

Canonical page: https://www.adaptabletools.com/docs/reference/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 .

```ts title="TypeScript"
export interface CommentOptions<TData = any> 
```

## Properties

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [dateFormat](https://www.adaptabletools.com/docs/reference/commentoptions.md#dateformat) | `string \| (() => string)` | Date Format string for Comments timestamp | &#39;dd-MM-yyyy HH:mm:ss&#39; |
| [isCellCommentable](https://www.adaptabletools.com/docs/reference/commentoptions.md#iscellcommentable) | `(commentableCellContext: `[`CommentableCellContext`](https://www.adaptabletools.com/docs/reference/commentablecellcontext.md)`) => boolean` | Function to configure if a cell can contain Comments |   |
| [showCommentAction](https://www.adaptabletools.com/docs/reference/commentoptions.md#showcommentaction) | `'hover' \| 'menu'` | Whether to show Comments by hovering (default) or via context menu | &#39;hover&#39; |
| [showPopupCloseButton](https://www.adaptabletools.com/docs/reference/commentoptions.md#showpopupclosebutton) | `boolean` | Show the Close Button in the Comments Popup | true |

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [loadCommentThreads(commentLoadContext)](https://www.adaptabletools.com/docs/reference/commentoptions.md#loadcommentthreads) | `Promise<`[`CommentThread`](https://www.adaptabletools.com/docs/reference/commentthread.md)`[]>` | Loads every comment thread when the grid starts. |
| [persistCommentThreads(commentThreads)](https://www.adaptabletools.com/docs/reference/commentoptions.md#persistcommentthreads) | `Promise<void>` | Saves the threads after a comment is added, edited or deleted.<br/><br/>Called with the full set, not only the thread that changed. |

## Property Details

### dateFormat

Date Format string for Comments timestamp

```ts title="TypeScript"
dateFormat?: string | (() => string);
```

###### Default Value

&#39;dd-MM-yyyy HH:mm:ss&#39;

###### Property Value

`string | (() => string)`

### isCellCommentable

Function to configure if a cell can contain Comments

```ts title="TypeScript"
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
```

###### Property Value

`(commentableCellContext: `[`CommentableCellContext`](https://www.adaptabletools.com/docs/reference/commentablecellcontext.md)`) => boolean`

### showCommentAction

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

```ts title="TypeScript"
showCommentAction?: 'hover' | 'menu';
```

###### Default Value

&#39;hover&#39;

###### Property Value

`'hover' | 'menu'`

### showPopupCloseButton

Show the Close Button in the Comments Popup

```ts title="TypeScript"
showPopupCloseButton?: boolean;
```

###### Default Value

true

###### Property Value

`boolean`

## Method Details

### loadCommentThreads

Loads every comment thread when the grid starts.

```ts title="TypeScript"
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| commentLoadContext | [`CommentLoadContext`](https://www.adaptabletools.com/docs/reference/commentloadcontext.md) | The grid the comments belong to |

###### Returns

 The threads to show. An empty list when there are none

`Promise<`[`CommentThread`](https://www.adaptabletools.com/docs/reference/commentthread.md)`[]>`

### persistCommentThreads

Saves the threads after a comment is added, edited or deleted.

Called with the full set, not only the thread that changed.

```ts title="TypeScript"
persistCommentThreads?(commentThreads: CommentThread[]): Promise<void>;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| commentThreads | [`CommentThread`](https://www.adaptabletools.com/docs/reference/commentthread.md)`[]` | Every thread, including the one that just changed |

###### Returns

`Promise<void>`
