-
Notifications
You must be signed in to change notification settings - Fork 773
Open
Labels
Description
Which Component Need Enhancement 期望新增功能的组件
- Form
What does the proposed API look like 期望支持的API
Feature Description 功能描述
The Form support most of input component, but doesn't support PinCode
Additional information 补充说明
I was try use withField and PinCode generate custom form field. But I found the IDE always hint me TS2769: No overload matches this call.
the code example like this:
const App = () => {
const PinCodeField = withField(PinCode);
return <Form>
<FormPinCode field="code" label="邀请码:" labelPosition="left" size="large" format="mixed" />
</Form>
}
the full hint is :
TS2769: No overload matches this call.
Overload 1 of 2,
(props: Subtract<PinCodeProps, CommonexcludeType> & CommonFieldProps & RefAttributes<any>, context?: any): string | ... 6 more ... | Component<...>
, gave the following error.
Property onChange is missing in type
{
field: string;
label: string;
labelPosition: "left";
size: "large";
format: "mixed";
}
but required in type Subtract<PinCodeProps, CommonexcludeType>
Overload 2 of 2,
(props: Subtract<PinCodeProps, CommonexcludeType> & CommonFieldProps & RefAttributes<any>): string | ... 6 more ... | Component<...>
, gave the following error.
Property onChange is missing in type
{
field: string;
label: string;
labelPosition: "left";
size: "large";
format: "mixed";
}
but required in type Subtract<PinCodeProps, CommonexcludeType>
foundation.d.ts(6, 5): onChange is declared here.
foundation.d.ts(6, 5): onChange is declared here.