GridHeaderLayout, VirtualizedGridStatus
Reference
GridHeaderLayoutis the toolbar row placed above a grid. It has a left area and a right area, with the same height and padding as the toolbar of the standard grids.VirtualizedGridStatusshows the record count text (for example17007 records). It renders nothing when the count is less than 1.- Used together they give a custom drill-down grid the same header as the standard drill-down: the export button on the left and the record count on the right.
GridHeaderLayout Props
leftHeader— Content for the left area (for example anExportCSVButton).rightHeader— Content for the right area (for exampleVirtualizedGridStatus).
VirtualizedGridStatus Props
-
totalRecords- Type:
number - Description: The total number of records. Nothing is rendered when it is less than 1.
- Type:
-
selectedRowsCount- Type:
number - Description: When set, the text becomes
Selected {selectedRowsCount} of {totalRecords} records.
- Type:
-
style- Type:
object - Default:
{} - Description: Extra styles for the text container.
- Type:
Usage Example
function Example() {
const { protrakComponents } = React.useContext(customWidgetContext);
const { GridHeaderLayout, VirtualizedGridStatus, ExportCSVButton } = protrakComponents;
return (
<GridHeaderLayout
leftHeader={<ExportCSVButton data={items} headers={csvHeaders} filename="export" />}
rightHeader={<VirtualizedGridStatus totalRecords={totalCount} />}
/>
);
}