UNPKG

@flatbiz/antd

Version:
21 lines (18 loc) 955 B
import { TextAreaProps } from 'antd/lib/input/index.js'; export type InputTextAreaWrapperProps = Omit<TextAreaProps, "defaultValue"> & { debounceDuration?: number; }; /** * ``` * 1. 在输入框内输入拼音的时候,在拼音尚未输入完成时,字母会触发Input的onChange事件;导致以上效果的原因是input事件没办法知道我们在使用中文输入法 * 2. 此处封装可以解决此问题,在输入拼音未完成时不会触达onChange,选择拼音结果触发onChange * * 3. 设置value时,内部可将受控操作转为非受控操作(由于支持防抖,所以不能受控) * 4. 适用场景:需要通过onChange事件处理业务逻辑,例如:在onChange中调用接口数据 * 5. defaultValue不可使用 * 6. 可设置防抖执行时间,默认值200ms * * ``` */ export declare const InputTextAreaWrapper: (props: InputTextAreaWrapperProps) => import("react").JSX.Element; export {};