chowa
Version:
UI component library based on React
45 lines (44 loc) • 1.42 kB
TypeScript
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { DataIndex } from './table-column';
import { UpdateParams, FilterInfo } from './table';
export interface Filter {
label: React.ReactText;
value: React.ReactText;
}
export interface TableFilterProps {
filtered?: boolean;
filterValues?: React.ReactText[];
filters?: Filter[] | React.ReactText[];
filterMultiple?: boolean;
filterMethod?: (dataIndex: DataIndex, values: React.ReactText[]) => any;
dataIndex: DataIndex;
activeFilter: FilterInfo;
updateTable: (params: UpdateParams) => void;
}
export interface TableFilterState {
filterVisible: boolean;
selfFilterValues: React.ReactText[];
filterValue: React.ReactText;
}
declare class TableFilter extends React.PureComponent<TableFilterProps, TableFilterState> {
constructor(props: TableFilterProps);
componentDidMount(): void;
componentDidUpdate(preProps: TableFilterProps): void;
private doFilter;
private resetFilter;
private onVisibleChange;
private onMultipleFilterChange;
private onSingleFilterChange;
private compileFilters;
private renderContent;
render(): JSX.Element;
}
export default TableFilter;