NoteApi

View as Markdown

Notes attached to cells. Each note has text, a type, and the cell it belongs to.

TypeScript
export interface

Methods

MethodReturnsDescription
addNote(text, primaryKeyValue, columnId, extra)voidAdds a new Note
deleteNote(note)voidRemoves a note from state.
editNote(note)voidReplaces a note already in state.
getAllNotes()AdaptableNotesGets all Notes
getNoteByUuid(uuid)AdaptableNote | undefinedReturns a Note by uuid
getNoteForCell(cellAddress)AdaptableNoteGets all Notes for a cell
getNoteState()NoteStateGets the Note State
setNoteType(note, noteType)voidSets Type of a Note ('Info' | 'Warning' | 'Error' | 'Success'), which drives colour of Note indicator
updateNoteText(text, note)voidReplaces 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
ParameterTypeDescription
textstringNote text
primaryKeyValueanyPrimary key of the row
columnIdstringColumn the note belongs to
extraPartial<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
ParameterTypeDescription
noteAdaptableNoteNote to delete
Returns

void

editNote

Replaces a note already in state.

TypeScript
editNote(note: AdaptableNote): void;
Parameters
ParameterTypeDescription
noteAdaptableNoteNote to save
Returns

void

getAllNotes

Gets all Notes

TypeScript
getAllNotes(): AdaptableNotes;
Returns

All Notes

AdaptableNotes

getNoteByUuid

Returns a Note by uuid

TypeScript
getNoteByUuid(uuid: string): AdaptableNote | undefined;
Parameters
ParameterTypeDescription
uuidstringnote uuid
Returns

A Note by uuid

AdaptableNote | undefined

getNoteForCell

Gets all Notes for a cell

TypeScript
getNoteForCell(cellAddress: CellAddress): AdaptableNote;
Parameters
ParameterTypeDescription
cellAddressCellAddressnote position
Returns

All Notes for a cell

AdaptableNote

getNoteState

Gets the Note State

TypeScript
getNoteState(): NoteState;
Returns

The Note State

NoteState

setNoteType

Sets Type of a Note ('Info' | 'Warning' | 'Error' | 'Success'), which drives colour of Note indicator

TypeScript
setNoteType(note: AdaptableNote, noteType: AdaptableMessageType): void;
Parameters
ParameterTypeDescription
noteAdaptableNotethe Note to update
noteTypeAdaptableMessageTypethe new Note Type
Returns

void

updateNoteText

Replaces the text of a note.

TypeScript
updateNoteText(text: string, note: AdaptableNote): void;
Parameters
ParameterTypeDescription
textstringNew note text
noteAdaptableNoteNote to update
Returns

void