@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
addClass
• Optional addClass: string
Defined in
cell
• Optional cell: number
Defined in
column
• Optional column: Column<TItem>
Defined in
escape
• Readonly escape: (value?: any) => string
Type declaration
▸ (value?): string
returns html escaped ctx.value if called without arguments. prefer this over ctx.value to avoid html injection attacks!
Parameters
| Name | Type |
|---|---|
value? |
any |
Returns
string
Defined in
grid
• Optional grid: any
Defined in
item
• Optional item: TItem
Defined in
row
• Optional row: number
Defined in
tooltip
• Optional tooltip: string
Defined in
value
• Optional value: any
when returning a formatter result, prefer ctx.escape() to avoid html injection attacks!