Notes Technical Reference
Summary
- Notes are provided in Note section of Initial Adaptable State
- Note Options allows developers to configure which Cells can receive Notes
- Note API provides run time access to Notes
Note State
The Note State of Initial Adaptable State contains a collection of AdaptableNotes:
| Property | Type | Description |
|---|---|---|
| Notes | AdaptableNotes | Collection of AdapTable Notes |
Adaptable Note
The full contents of the AdaptableNote object is as follows:
| Property | Type | Description |
|---|---|---|
| ColumnId | string | Id of Column containing the Note |
| PrimaryKeyValue | any | Value in Grid's Primary Key Column |
| Text | string | Content of the Note |
| Timestamp | number | When Note was made |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Note Options
The Note Options section of Adaptable Options contains options to configure Note behaviour:
| Property | Type | Description | Default |
|---|---|---|---|
| dateFormat | string | (() => string) | Date Format string for Notes timestamp | 'dd-MM-yyyy HH:mm:ss' |
| isCellNotable | (context:NotableCellContext) => boolean | Whether a cell can contain Notes | |
| showNoteAction | 'hover' | 'menu' | Whether to show Notes by hovering (default) or via context menu | 'hover' |
| showPopupCloseButton | boolean | Show the Close Button in the Notes Popup | true |
Note API
Full programmatic access to Notes is available in Note API section of Adaptable API .
This enables Notes to be retrieved, created, edited and deleted programmatically.
| Method | Returns | Description |
|---|---|---|
| addNote(text, primaryKeyValue, columnId) | void | Adds a new Note |
| deleteNote(note) | void | Deletes a Note |
| editNote(note) | void | Edits a Note |
| getAllNotes() | AdaptableNotes | Gets all Notes |
| getNoteByUuid(uuid) | AdaptableNote | undefined | Returns a Note by uuid |
| getNoteForCell(cellAddress) | AdaptableNote | Gets all Notes for a cell |
| getNoteState() | NoteState | Gets the Note State |
| updateNoteText(text, note) | void | Edits text of a Note |