ProFormFields

ProForm comes with a significant number of form items, which are essentially a combination of Form.Item and components. Each form item supports the fieldProps property to support setting the props of the input component. We support pass-through of placeholder, so you can set placeholder directly on the component.

Each form item also supports readonly, which has different read-only styles for different components, making readonly display more friendly compared to disable. The generated dom is also smaller, e.g. ProFormDigit automatically formats decimal digits.

ProFormText is the product of FormItem + Input and can be analogous to the following code.

const ProFormText = (props) => {
return (
<ProForm.Item {. .props}>
<Input placeholder={props.placeholder} {. .props.fieldProps} />
</ProForm.Item
);
};

So the props we set for ProFormText are actually for Form.Item, and the fieldProps are for the included Input, remember.

Demo

Full amount of form field

文本类
选择类
China
未解决