Interface: FetchSelectedOptions#
grist-plugin-api.FetchSelectedOptions
Options for functions which fetch data from the selected table or record:
- onRecords
- onRecord
- fetchSelectedRecord
- fetchSelectedTable
- GristView.fetchSelectedRecord
- GristView.fetchSelectedTable
The different methods have different default values for keepEncoded
and format
.
Table of contents#
Properties#
Properties#
format#
• Optional
format: "columns"
| "rows"
rows
, the returned data will be an array of objects, one per row, with column names as keys.columns
, the returned data will be an object with column names as keys, and arrays of values.
includeColumns#
• Optional
includeColumns: "shown"
| "normal"
| "all"
shown
(default): return only columns that are explicitly shown in the right panel configuration of the widget. This is the only value that doesn’t require full access.normal
: return all ‘normal’ columns, regardless of whether the user has shown them.all
: also return special invisible columns likemanualSort
and display helper columns.
keepEncoded#
• Optional
keepEncoded: boolean
true
: the returned data will contain raw CellValue‘s.false
: the values will be decoded, replacing e.g.['D', timestamp]
with a moment date.