Why does props not able to pass?

Viewed 35

Unable to pass props,

Parent component:
props: {
    data: {
      type: Object as PropType<FormatOrderItem>,
      default: () => {}
    }

Now, when in child component I try to pass I get type Error could you help me fix this,

  <ElScrollbar>
    {Store.Record.map((item, index) => (
  <ResultItem status={form.status} key={index + '_KEY'} data={item} />
  ))}
  </ElScrollbar>

Error received 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>
0 Answers
Related