@serenity-is/sleekgrid / FormatterContext

Interface: FormatterContext<TItem>

Type parameters

Name Type
TItem any

Table of contents

Properties

Properties

addAttrs

Optional addAttrs: Object

Index signature

▪ [key: string]: string

Defined in

core/formatting.ts:5


addClass

Optional addClass: string

Defined in

core/formatting.ts:6


cell

Optional cell: number

Defined in

core/formatting.ts:7


column

Optional column: Column<TItem>

Defined in

core/formatting.ts:8


escape

Readonly escape: (value?: any) => string

returns html escaped ctx.value if called without arguments. prefer this over ctx.value to avoid html injection attacks!

Type declaration

▸ (value?): string

Parameters
Name Type
value? any
Returns

string

Defined in

core/formatting.ts:10


grid

Optional grid: any

Defined in

core/formatting.ts:11


item

Optional item: TItem

Defined in

core/formatting.ts:12


row

Optional row: number

Defined in

core/formatting.ts:13


tooltip

Optional tooltip: string

Defined in

core/formatting.ts:14


value

Optional value: any

when returning a formatter result, prefer ctx.escape() to avoid script injection attacks!

Defined in

core/formatting.ts:16