Blockquote
Having trouble passing props,
Parent component:
props: {
data: {
type: Object as PropType<FormatOrderItem>,
default: () => {}
}
I'm facing an issue when trying to pass props from the parent component to the child component. Can you assist me in resolving this error?
<ElScrollbar>
{Store.Record.map((item, index) => (
<ResultItem status={form.status} key={index + '_KEY'} data={item} />
))}
</ElScrollbar>
The error arises at data={item}
TS2322: Type '{ status: 0 | 2 | 1 | null | undefined; key: string; value: { id: string; username: string; leagueId: number; leagueName: string; homeId: number; awayId: number; matchTime: number; sportType: number; ... 41 more ...; versionKey: string; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{ data: FormatOrderItem; }> & Omit<Readonly<ExtractPropTypes<{ data: { type: PropType; default: () => {}; }; status: { ...; }; }>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "data">'. Property 'value' does not exist on type 'IntrinsicAttributes & Partial<{ data: FormatOrderItem; }> & Omit<Readonly<ExtractPropTypes<{ data: { type: PropType; default: () => {}; }; status: { ...; }; }>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "data">'.
<ElScrollbar>
{Store.Record.map((item, index) => (`enter code here`
<ResultItem status={form.status} key={index + '_KEY'} data={item} />
))}
</ElScrollbar>