Warning
Nous commençons tout juste à traduire la documentation pour cette langue, désolé !
Nous affichons des pages traduites partiellement afin de suivre l’avancement.
Cette page n’est pas encore traduite. Mais la bonne nouvelle est que vous pouvez rejoindre la communauté de traduction pour nous aider 👋.
Interface: WidgetAPI#
grist-plugin-api.WidgetAPI
API to manage Custom Widget state.
Table of contents#
Methods#
Methods#
clearOptions#
▸ clearOptions(): Promise<void>
Clears all the options.
Returns#
Promise<void>
getOption#
▸ getOption(key): Promise<any>
Get single value from Widget options object.
Parameters#
| Name | Type |
|---|---|
key |
string |
Returns#
Promise<any>
getOptions#
▸ getOptions(): Promise<null | object>
Gets all options stored by the widget. Options are stored as plain JSON object.
Returns#
Promise<null | object>
setOption#
▸ setOption(key, value): Promise<void>
Store single value in the Widget options object (and create it if necessary).
Parameters#
| Name | Type |
|---|---|
key |
string |
value |
any |
Returns#
Promise<void>
setOptions#
▸ setOptions(options): Promise<void>
Replaces all options stored by the widget.
Parameters#
| Name | Type |
|---|---|
options |
Object |
Returns#
Promise<void>