Interface: GristView#
grist-plugin-api.GristView
Interface for the data backing a single widget.
Table of contents#
Methods#
Methods#
allowSelectBy#
▸ allowSelectBy(): Promise
<void
>
Deprecated now. It was used for filtering selected table by setSelectedRows
method.
Now the preferred way it to use ready message.
Returns#
Promise
<void
>
fetchSelectedRecord#
▸ fetchSelectedRecord(rowId
, options?
): Promise
<any
>
Fetches selected record by its rowId
. By default, options.keepEncoded
is true
.
Parameters#
Name | Type |
---|---|
rowId |
number |
options? |
FetchSelectedOptions |
Returns#
Promise
<any
>
fetchSelectedTable#
▸ fetchSelectedTable(options?
): Promise
<any
>
Like GristDocAPI.fetchTable,
but gets data for the custom section specifically, if there is any.
By default, options.keepEncoded
is true
and format
is columns
.
Parameters#
Name | Type |
---|---|
options? |
FetchSelectedOptions |
Returns#
Promise
<any
>
setCursorPos#
▸ setCursorPos(pos
): Promise
<void
>
Sets the cursor position to a specific row and field. sectionId
is ignored. Used for widget linking.
Parameters#
Name | Type |
---|---|
pos |
CursorPos |
Returns#
Promise
<void
>
setSelectedRows#
▸ setSelectedRows(rowIds
): Promise
<void
>
Set the list of selected rows to be used against any linked widget.
Parameters#
Name | Type |
---|---|
rowIds |
null | number [] |
Returns#
Promise
<void
>