mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add grist.getTable(tableId) and a getTableId() method in plugin api
Summary: Makes the new TableOperations API available for all tables in the document. Adds methods for discovering the tableId of the selected table. I was very tempted to implement the select() TODO in the TableOperations API, but it requires a significant refactor of the backend. Test Plan: added test Reviewers: alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3325
This commit is contained in:
@@ -16,6 +16,10 @@ export class TableOperationsImpl implements TableOperations {
|
||||
private _defaultOptions: OpOptions) {
|
||||
}
|
||||
|
||||
public getTableId() {
|
||||
return this._platform.getTableId();
|
||||
}
|
||||
|
||||
public create(records: Types.NewRecord, options?: OpOptions): Promise<Types.MinimalRecord>;
|
||||
public create(records: Types.NewRecord[], options?: OpOptions): Promise<Types.MinimalRecord[]>;
|
||||
public async create(recordsOrRecord: Types.NewRecord[]|Types.NewRecord,
|
||||
|
||||
Reference in New Issue
Block a user