mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adds setSelectedRows to the grist api for custom view
Summary: This is needed to let custom widget driver filtering of other widget in the same page. Descripion here: - https://grist.quip.com/ctytAQJoFMsM/Hopefully-Small-Projects#temp:C:NNCfe2030b27647439886ca83595 Test Plan: New api tested in a new nbrowser test Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3253
This commit is contained in:
@@ -360,6 +360,14 @@ export class GristViewImpl implements GristView {
|
||||
return data;
|
||||
}
|
||||
|
||||
public async allowSelectBy(): Promise<void> {
|
||||
this._baseView.viewSection.allowSelectBy.set(true);
|
||||
}
|
||||
|
||||
public async setSelectedRows(rowIds: number[]): Promise<void> {
|
||||
this._baseView.viewSection.selectedRows.set(rowIds);
|
||||
}
|
||||
|
||||
private _visibleColumns() {
|
||||
const columns: ColumnRec[] = this._baseView.viewSection.columns.peek();
|
||||
const hiddenCols = this._baseView.viewSection.hiddenColumns.peek().map(c => c.id.peek());
|
||||
|
||||
Reference in New Issue
Block a user