synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
36 lines • 2.22 kB
TypeScript
import { Row, RowSet } from '@sage-bionetworks/synapse-types';
import { ColumnDef } from '@tanstack/react-table';
import { LabelLinkConfig } from '../CardContainerLogic';
export type SynapseTableConfiguration = Pick<SynapseTableProps, 'showAccessColumn' | 'showExternalAccessIcon' | 'showAccessColumnHeader' | 'showDownloadColumn' | 'hideDownload' | 'showDirectDownloadColumn' | 'hideAddToDownloadListColumn' | 'columnLinks' | 'customColumns'>;
export type SynapseTableProps = {
/** The row data shown in the table. */
rowSet: RowSet;
/** Whether a new page of data is being loaded */
isLoadingNewPage: boolean;
/** Custom columns to render in the table */
customColumns?: ColumnDef<Row, any>[];
/** If true and entity is a view or dataset, renders a column that represents if the caller has permission to download the entity represented by the row */
showAccessColumn?: boolean;
/**
* If true, the component will show enhanced UI for the case where
* - the entity is a FileEntity, AND
* - the caller has permission to fetch the dataFileHandle, AND
* - the dataFileHandle is an instance of ExternalFileHandleInterface (i.e. the file is not controlled by Synapse)
* Note that this requires an additional API call that cannot be batched, so it should be avoided in bulk contexts if possible.
* @default false
*/
showExternalAccessIcon?: boolean;
showAccessColumnHeader?: boolean;
/** @deprecated use showDirectDownloadColumn */
showDownloadColumn?: boolean;
/** @deprecated use hideAddToDownloadListColumn */
hideDownload?: boolean;
/** If true and entity is a file view or dataset, renders a column that allows the logged-in user to directly download the file, if they have permission */
showDirectDownloadColumn?: boolean;
/** If true, the add to download list column will be hidden */
hideAddToDownloadListColumn?: boolean;
/** Configuration to override cell renderers with e.g. a link to a portals detail page */
columnLinks?: LabelLinkConfig;
};
export declare function SynapseTable(props: SynapseTableProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=SynapseTable.d.ts.map