You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The full error is: TS2322: Type '(option: Item) => JSX.Element' is not assignable to type 'RenderMenuItemChildren'. Types of parameters 'option' and 'option' are incompatible. Type 'Option' is not assignable to type 'Item'. Type 'string' is not assignable to type 'Item'.
This is when I try to use the example from "https://github.com/ericgio/react-bootstrap-typeahead/blob/v6.2.3/example/src/examples/AsyncExample.tsx" exactly as is.
The line is: renderMenuItemChildren={(option: Item) => ( <> <img alt={option.login} src={option.avatar_url} style={{ height: '24px', marginRight: '10px', width: '24px', }} /> <span>{option.login}</span> </> )}
Is this a project setting issue? or something else? (Note: I'm a TS newbie)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
The full error is:
TS2322: Type '(option: Item) => JSX.Element' is not assignable to type 'RenderMenuItemChildren'. Types of parameters 'option' and 'option' are incompatible. Type 'Option' is not assignable to type 'Item'. Type 'string' is not assignable to type 'Item'.This is when I try to use the example from "https://github.com/ericgio/react-bootstrap-typeahead/blob/v6.2.3/example/src/examples/AsyncExample.tsx" exactly as is.
The line is:
renderMenuItemChildren={(option: Item) => ( <> <img alt={option.login} src={option.avatar_url} style={{ height: '24px', marginRight: '10px', width: '24px', }} /> <span>{option.login}</span> </> )}Is this a project setting issue? or something else? (Note: I'm a TS newbie)
All reactions