react-admin-component
Version:
react library
26 lines (25 loc) • 1.02 kB
TypeScript
import React from 'react';
import { FormProps, WrappedFormUtils } from 'antd/lib/form/Form';
export interface FormBaseProps {
field: string;
label?: string;
initialValue?: any;
readOnly?: boolean;
disabled?: boolean;
allowClear?: boolean;
required?: boolean;
placeholder?: string;
validator?: Function;
render?: (value: any, form?: WrappedFormUtils) => React.ReactElement;
}
interface FormInputProps extends FormBaseProps, FormProps {
max?: number;
validator?: (rule: any, value: any, callback: any, form: any) => any;
valueFilter?: (value: any) => any;
inputProps?: any;
valueType?: string;
textarea?: boolean;
autoSize?: any;
}
declare const FormInput: ({ required, label, field, placeholder, max, readOnly, initialValue, valueFilter, form, disabled, inputProps, validator, valueType, allowClear, labelCol, wrapperCol, className, textarea, autoSize, ...restProps }: FormInputProps) => JSX.Element;
export default FormInput;