@schema-render/search-table-react
Version:
Conditional search table component.
20 lines (19 loc) • 782 B
TypeScript
import type { IObjectAny } from '@schema-render/core-react';
import type { MutableRefObject } from 'react';
import type { ILocale, ISearchTableProps, ISearchTableRef } from '../typings';
interface IUseSearchParams {
locale: ILocale;
loading: boolean;
search: ISearchTableProps['search'];
searchValueRef: MutableRefObject<IObjectAny>;
runRequest: ISearchTableRef['refresh'];
updateScrollY: ISearchTableRef['updateScrollY'];
}
/**
* 搜索栏数据处理
*/
export default function useSearch({ locale, loading, search, searchValueRef, runRequest, updateScrollY, }: IUseSearchParams): {
searchNodeHolder: import("react/jsx-runtime").JSX.Element | null;
searchRef: import("react").RefObject<import("@schema-render/core-react").ICoreRef>;
};
export {};