import * as React from 'react'; import { DetailsList, DetailsListLayoutMode, IColumn, IDetailsFooterProps, DetailsRow, SelectionMode, DetailsRowCheck, IDetailsRowBaseProps, IDetailsRowCheckStyles, } from '@fluentui/react/lib/DetailsList'; export interface IDetailsListCustomFooterExampleItem { key: number; name: string; value: number; } export class DetailsListCustomFooterExample extends React.Component<{}, {}> { private _items: IDetailsListCustomFooterExampleItem[]; private _columns: IColumn[]; constructor(props: {}) { super(props); this._items = []; for (let i = 0; i < 5; i++) { this._items.push({ key: i, name: 'Item ' + i, value: i, }); } this._columns = [ { key: 'column1', name: 'Name', fieldName: 'name', minWidth: 100, maxWidth: 200, isResizable: true }, { key: 'column2', name: 'Value', fieldName: 'value', minWidth: 100, maxWidth: 200, isResizable: true }, ]; } public render(): JSX.Element { return ( ); } private _onRenderDetailsFooter(detailsFooterProps: IDetailsFooterProps): JSX.Element { return ( ); } } const _renderDetailsFooterItemColumn: IDetailsRowBaseProps['onRenderItemColumn'] = (item, index, column) => { if (column) { return (
{column.name}
); } return undefined; }; const detailsRowCheckStyles: Partial = { root: { visibility: 'hidden' } }; const _onRenderCheckForFooterRow: IDetailsRowBaseProps['onRenderCheck'] = (props): JSX.Element => { return ; };