sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function Table

Table(props): Promise< ReactNode > | ReactNode

Table with aggregation and pagination.

Parameters

ParameterTypeDescription
propsTablePropsTable properties

Returns

Promise< ReactNode > | ReactNode

Table component

Example

Table displaying year, condition, and total revenue from the Sample ECommerce data model.

import { Table } from '@sisense/sdk-ui';
import { measureFactory } from '@sisense/sdk-data';
import * as DM from './sample-ecommerce';

const CodeExample = () => (
  <Table
    dataSet={DM.DataSource}
    dataOptions={{
      columns: [
        { column: DM.Commerce.Date.Years, name: 'Year', dateFormat: 'yyyy' },
        DM.Commerce.Condition,
        measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
      ],
    }}
    styleOptions={{
      rowsPerPage: 12,
      height: 420,
      header: { color: { enabled: true, backgroundColor: '#94F5F0', textColor: '#121A23' } },
      rows: { alternatingColor: { enabled: true, backgroundColor: '#f2f2f2' } },
    }}
  />
);

export default CodeExample;
Table example 1
Last Updated: