synapse-react-client
Version:
[](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [](https://badge.fury.io/js/synaps
44 lines (43 loc) • 1.85 kB
TypeScript
import React from 'react';
import { Direction, EntityHeader, EntityType, ProjectHeader, SortBy } from '../../../../utils/synapseTypes';
import { Hit } from '../../../../utils/synapseTypes/Search';
import { EntityDetailsListSharedProps } from '../EntityDetailsList';
export declare type DetailsViewProps = EntityDetailsListSharedProps & {
entities: (EntityHeader | ProjectHeader | Hit)[];
isLoading: boolean;
hasNextPage?: boolean;
fetchNextPage?: () => Promise<any>;
isFetchingNextPage?: boolean;
/** The current sort of the view. If the view cannot be sorted, set this to `undefined` */
sort?: {
sortBy: SortBy;
sortDirection: Direction;
};
/** If sortable, `setSort` will be invoked when the user tries to change the sort */
setSort?: (soryBy: SortBy, sortDirection: Direction) => void;
noResultsPlaceholder?: React.ReactElement;
/** We defer to the configuration component to determine this */
selectAllIsChecked?: boolean;
};
/**
* Describes the shape of the data passed to the BaseTable
*/
export declare type DetailsViewRowData = (EntityHeader | ProjectHeader | Hit) & {
entityId: string;
versionNumber?: number;
entityType: EntityType;
isSelected: boolean;
isDisabled: boolean;
isVersionableEntity: boolean;
currentSelectedVersion?: number;
};
/**
* Displays a list of entities in a table.
*
* If the list of entities is paginated, the `hasNextPage` prop can be set to indicate that there is more data to load.
* When the view is ready to load more data, the `fetchNextPage` callback will be invoked. The view is designed to handle
* an "infinite scroll" pattern, so entities should not be removed from the list when loading the next page.
*
* @param param0
*/
export declare const DetailsView: React.FunctionComponent<DetailsViewProps>;