Interface: GristView#
grist-plugin-api.GristView
Interface for the data backing a single widget.
Table of contents#
Methods#
Methods#
allowSelectBy#
▸ allowSelectBy(): Promise
<void
>
Allow custom widget to be listed as a possible source for linking with SELECT BY.
Returns#
Promise
<void
>
fetchSelectedRecord#
▸ fetchSelectedRecord(rowId
): Promise
<any
>
Fetches selected record by its rowId
.
Parameters#
Name | Type |
---|---|
rowId |
number |
Returns#
Promise
<any
>
fetchSelectedTable#
▸ fetchSelectedTable(): Promise
<any
>
Like GristDocAPI.fetchTable, but gets data for the custom section specifically, if there is any.
Returns#
Promise
<any
>
setSelectedRows#
▸ setSelectedRows(rowIds
): Promise
<void
>
Set the list of selected rows to be used against any linked widget. Requires allowSelectBy()
.
Parameters#
Name | Type |
---|---|
rowIds |
number [] |
Returns#
Promise
<void
>