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
): 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
>
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
>