NoteApi
Notes attached to cells. Each note has text, a type, and the cell it belongs to.
TypeScript
export interfaceMethods
| Method | Returns | Description |
|---|---|---|
| addNote(text, primaryKeyValue, columnId, extra) | void | Adds a new Note |
| deleteNote(note) | void | Removes a note from state. |
| editNote(note) | void | Replaces a note already in state. |
| 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 |
| setNoteType(note, noteType) | void | Sets Type of a Note ('Info' | 'Warning' | 'Error' | 'Success'), which drives colour of Note indicator |
| updateNoteText(text, note) | void | Replaces the text of a note. |
Method Details
addNote
Adds a new Note
TypeScript
addNote(text: string, primaryKeyValue: any, columnId: string, extra?: Partial<AdaptableNote>): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| text | string | Note text |
| primaryKeyValue | any | Primary key of the row |
| columnId | string | Column the note belongs to |
| extra | Partial<AdaptableNote> | optional additional Note properties (e.g. Author, Metadata, IsReadOnly);Author and CreatedAt are stamped automatically when not supplied |
Returns
void
deleteNote
Removes a note from state.
TypeScript
deleteNote(note: AdaptableNote): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| note | AdaptableNote | Note to delete |
Returns
void
editNote
Replaces a note already in state.
TypeScript
editNote(note: AdaptableNote): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| note | AdaptableNote | Note to save |
Returns
void
getAllNotes
Gets all Notes
TypeScript
getAllNotes(): AdaptableNotes;Returns
All Notes
getNoteByUuid
Returns a Note by uuid
TypeScript
getNoteByUuid(uuid: string): AdaptableNote | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| uuid | string | note uuid |
Returns
A Note by uuid
AdaptableNote | undefined
getNoteForCell
Gets all Notes for a cell
TypeScript
getNoteForCell(cellAddress: CellAddress): AdaptableNote;Parameters
| Parameter | Type | Description |
|---|---|---|
| cellAddress | CellAddress | note position |
Returns
All Notes for a cell
getNoteState
Gets the Note State
TypeScript
getNoteState(): NoteState;Returns
The Note State
setNoteType
Sets Type of a Note ('Info' | 'Warning' | 'Error' | 'Success'), which drives colour of Note indicator
TypeScript
setNoteType(note: AdaptableNote, noteType: AdaptableMessageType): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| note | AdaptableNote | the Note to update |
| noteType | AdaptableMessageType | the new Note Type |
Returns
void
updateNoteText
Replaces the text of a note.
TypeScript
updateNoteText(text: string, note: AdaptableNote): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| text | string | New note text |
| note | AdaptableNote | Note to update |
Returns
void