UNPKG

shineout

Version:

Shein 前端组件库

59 lines (58 loc) 3.14 kB
/// <reference types="node" /> import React from 'react'; import { SelectPropsWidthTiled, SelectPropsWidthFilter } from './Props'; interface FilterState<Item> { innerFilter: undefined | ((data: Item) => boolean); innerData: undefined; filterText: string; text: string; } declare const _default: <Item, Value>(Origin: React.ComponentType<SelectPropsWidthTiled<Item, Value>>) => { new (props: SelectPropsWidthFilter<Item, Value>): { resultCache: Map<Value, Item>; timer: NodeJS.Timer; componentDidUpdate(prevProps: SelectPropsWidthFilter<Item, Value>): void; getTreeResult(value: Value, prediction: (_value: Value, data: Item) => boolean): Item | undefined; getResult(value: Value): Item | undefined; getCachedResult(value: Value): Item | import("./Props").UnMatchedValue<Value>; handleFilter(text: string, from?: string): void; handleCreate(text: string): any; filterTreeData(): { treeData: (Item | null)[] | undefined; expanded: any; rawData: Item[] | undefined; }; filterData(): { data: Item[] | undefined; }; render(): JSX.Element; context: any; setState<K extends keyof FilterState<Item>>(state: FilterState<Item> | ((prevState: Readonly<FilterState<Item>>, props: Readonly<SelectPropsWidthFilter<Item, Value>>) => FilterState<Item> | Pick<FilterState<Item>, K> | null) | Pick<FilterState<Item>, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<SelectPropsWidthFilter<Item, Value>> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<FilterState<Item>>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<SelectPropsWidthFilter<Item, Value>>, nextState: Readonly<FilterState<Item>>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<SelectPropsWidthFilter<Item, Value>>, prevState: Readonly<FilterState<Item>>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<SelectPropsWidthFilter<Item, Value>>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<SelectPropsWidthFilter<Item, Value>>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<SelectPropsWidthFilter<Item, Value>>, nextState: Readonly<FilterState<Item>>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<SelectPropsWidthFilter<Item, Value>>, nextState: Readonly<FilterState<Item>>, nextContext: any): void; }; defaultProps: { data: never[]; filterDelay: number; showHitDescendants: boolean; }; contextType?: React.Context<any> | undefined; }; export default _default;