UNPKG

@schema-render/search-react

Version:

Conditional search component based on FormRender.

29 lines (28 loc) 909 B
import type { IFormRenderRef, IRegisterActions } from '@schema-render/form-render-react'; import type { RefObject } from 'react'; import type { IInnerSearchProps } from '../typings'; /** * 「收起/展开」功能处理 */ export default function useCollapse(props: IInnerSearchProps, formRenderRef: RefObject<IFormRenderRef>): { schema: import("@schema-render/form-render-react").IFormRenderRootSchema<string>; registerActions: IRegisterActions<{ FormRender: { submit: string; reset: string; placeholderInput: string; placeholderSelect: string; comma: string; displayDateRange: string; }; Search: { collapse: string; expand: string; }; localeName: string; validation: { required: string; typeError: string; }; }>; };