mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Exposing WidgetApi methods in a module scope
Summary: Exposing WidgetApi methods (getOption, setOption, ...) in a module scope to simplify custom widget code. Test Plan: manual tests for now, as plugin is not yet on production. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3268
This commit is contained in:
parent
3136077636
commit
8d34b70899
@ -73,6 +73,13 @@ export const docApi: GristDocAPI & GristView = {
|
||||
|
||||
export const on = rpc.on.bind(rpc);
|
||||
|
||||
// Exposing widgetApi methods in a module scope.
|
||||
export const getOption = widgetApi.getOption.bind(widgetApi);
|
||||
export const setOption = widgetApi.setOption.bind(widgetApi);
|
||||
export const setOptions = widgetApi.setOptions.bind(widgetApi);
|
||||
export const getOptions = widgetApi.getOptions.bind(widgetApi);
|
||||
export const clearOptions = widgetApi.clearOptions.bind(widgetApi);
|
||||
|
||||
// For custom widgets that support custom columns mappings store current configuration
|
||||
// in a memory.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user