How to pass different types of props to different components #13457
Unanswered
seafronthu
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Component error in template !!!
Result:
Argument of type '{ key: string; item: FormItemInputPropsType | FormItemDatetimerangePropsType | FormItemRatePropsType; }' is not assignable to parameter of type '(({ readonly item: FormItemRatePropsType; } & VNodeProps & AllowedComponentProps & ComponentCustomProps) | ({ ...; } & ... 2 more ... & ComponentCustomProps) | ({ ...; } & ... 2 more ... & ComponentCustomProps)) & Record<...>'. Type '{ key: string; item: FormItemInputPropsType | FormItemDatetimerangePropsType | FormItemRatePropsType; }' is not assignable to type '{ readonly item: FormItemDatetimerangePropsType; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & Record<...>'. Type '{ key: string; item: FormItemInputPropsType | FormItemDatetimerangePropsType | FormItemRatePropsType; }' is not assignable to type '{ readonly item: FormItemDatetimerangePropsType; }'. Types of property 'item' are incompatible. Type 'FormItemInputPropsType | FormItemDatetimerangePropsType | FormItemRatePropsType' is not assignable to type 'FormItemDatetimerangePropsType'. Type 'FormItemInputPropsType' is not assignable to type 'FormItemDatetimerangePropsType'. Type 'FormItemInputPropsType' is not assignable to type '{ params: string[]; value?: number[] | undefined; 'start-placeholder'?: string | undefined; 'end-placeholder'?: string | undefined; type: "datetimerange"; }'. Types of property 'params' are incompatible. Type 'string' is not assignable to type 'string[]'.ts-plugin(2345)
How should I solve this problem !!!
Please help me with this child !!!
Beta Was this translation helpful? Give feedback.
All reactions