You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
540 B
13 lines
540 B
3 years ago
|
import {UIRowId} from 'app/common/UIRowId';
|
||
|
import {TableData} from "./TableData";
|
||
3 years ago
|
|
||
|
/**
|
||
|
* Return whether a table identified by the rowId of its metadata record, should normally be
|
||
|
* hidden from the user (e.g. as an option in the page-widget picker).
|
||
|
*/
|
||
3 years ago
|
export function isHiddenTable(tablesData: TableData, tableRef: UIRowId): boolean {
|
||
3 years ago
|
const tableId = tablesData.getValue(tableRef, 'tableId') as string|undefined;
|
||
|
return tablesData.getValue(tableRef, 'summarySourceTable') !== 0 ||
|
||
|
Boolean(tableId?.startsWith('GristHidden'));
|
||
|
}
|