office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
39 lines (38 loc) • 1.3 kB
TypeScript
/// <reference types="react" />
import * as React from 'react';
import { ISelection, SelectionMode } from 'office-ui-fabric-react/lib/Selection';
import './Selection.Example.scss';
export interface ISelectionBasicExampleState {
items: any[];
selection: ISelection;
selectionMode?: SelectionMode;
canSelect?: string;
}
export interface ISelectionItemExampleProps {
item?: any;
itemIndex?: number;
selection?: ISelection;
selectionMode?: SelectionMode;
}
/**
* The SelectionItemExample controls and displays the selection state of a single item
*/
export declare class SelectionItemExample extends React.Component<ISelectionItemExampleProps, {}> {
render(): JSX.Element;
}
/**
* The SelectionBasicExample controls the selection state of all items
*/
export declare class SelectionBasicExample extends React.Component<{}, ISelectionBasicExampleState> {
private _hasMounted;
constructor(props: {});
componentDidMount(): void;
render(): JSX.Element;
private _alertItem;
private _onSelectionChanged();
private _onToggleSelectAll();
private _onSelectionModeChanged(ev, menuItem);
private _onCanSelectChanged(ev, menuItem);
private _canSelectItem(item);
private _getCommandItems();
}