Open ksei9305 opened 8 months ago
Steps to reproduce:
const userMentions = users ? users.map((user) => ({ id: user.id, display: user.name })) : []; <MentionsInput value={''} onChange={() => {}}> <Mention trigger="@" data={userMentions} renderSuggestion={userMentions} /> </MentionsInput>
TS2322: Type '{ trigger: string; data: { id: string; display: string; }[]; renderSuggestion: { id: string; display: string; }[]; }' is not assignable to type 'IntrinsicAttributes & Pick<InferProps<{ onAdd: any; onRemove: any; renderSuggestion: any; trigger: any; markup: any; displayTransform: any; allowSpaceInQuery: any; isLoading: any; }>, "allowSpaceInQuery"> & InexactPartial<...> & InexactPartial<...>'. Property 'data' does not exist on type 'IntrinsicAttributes & Pick<InferProps<{ onAdd: any; onRemove: any; renderSuggestion: any; trigger: any; markup: any; displayTransform: any; allowSpaceInQuery: any; isLoading: any; }>, "allowSpaceInQuery"> & InexactPartial<...> & InexactPartial<...>'. 139 | {//>/} 140 | <MentionsInput value={''} onChange={() => {}}> 141 | | ^^^^ 142 | 143 | 144 |
TS2322: Type '{ trigger: string; data: { id: string; display: string; }[]; renderSuggestion: { id: string; display: string; }[]; }' is not assignable to type 'IntrinsicAttributes & Pick<InferProps<{ onAdd: any; onRemove: any; renderSuggestion: any; trigger: any; markup: any; displayTransform: any; allowSpaceInQuery: any; isLoading: any; }>, "allowSpaceInQuery"> & InexactPartial<...> & InexactPartial<...>'. Property 'data' does not exist on type 'IntrinsicAttributes & Pick<InferProps<{ onAdd: any; onRemove: any; renderSuggestion: any; trigger: any; markup: any; displayTransform: any; allowSpaceInQuery: any; isLoading: any; }>, "allowSpaceInQuery"> & InexactPartial<...> & InexactPartial<...>'. 139 | {//>/} 140 | <MentionsInput value={''} onChange={() => {}}>
141 | | ^^^^ 142 | 143 | 144 |
Workaround: "react-mentions": "^4.4.10",
Steps to reproduce:
Workaround: "react-mentions": "^4.4.10",