UNPKG

zent

Version:

一套前端设计语言和基于React的实现

31 lines (30 loc) 1.4 kB
import { PureComponent } from 'react'; import { ICheckboxProps } from '../checkbox'; import Store from './Store'; export interface IGridSelectionAllCheckboxProps<Data> { store: Store; datasets: ReadonlyArray<Data>; disabledDatasets: ReadonlyArray<Data>; getDataKey: (data: Data, rowIndex: number | string) => string; disabled: boolean; onSelect: (type: 'selectAll' | 'removeAll', datasets: ReadonlyArray<Data>) => void; } interface IGridSelectionAllCheckboxState { checked: boolean; indeterminate: boolean; } declare class SelectionCheckboxAll<Data> extends PureComponent<IGridSelectionAllCheckboxProps<Data>, IGridSelectionAllCheckboxState> { constructor(props: IGridSelectionAllCheckboxProps<Data>); unsubscribe: any; subscribe: () => void; getCheckBoxState: (props: IGridSelectionAllCheckboxProps<Data>, type: 'every' | 'some') => boolean; getCheckState: (props: IGridSelectionAllCheckboxProps<Data>) => boolean; getIndeterminateState: (props: IGridSelectionAllCheckboxProps<Data>) => boolean; setCheckState: (props: IGridSelectionAllCheckboxProps<Data>) => void; onChange: ICheckboxProps<unknown>['onChange']; componentDidMount(): void; componentWillReceiveProps(nextProps: IGridSelectionAllCheckboxProps<Data>): void; componentWillUnmount(): void; render(): JSX.Element; } export default SelectionCheckboxAll;