1
Answer

react-bootstrap-typeahead

Hi! I am using react-bootstrap-typeahead 5.1.8 version. When I using typeahead it's show mistake in name. My code:

 return (

        <>

            <label>{props.displayName}</label>

            <Typeahead

                id="typeahead"

                onChange={actor => {

                    console.log(actor);                    

                }}

                options={actors}

                labelKey={actor => actor.name}

                filterBy={['name']}

                placeholder="Write the name of the actor..."

                minLength={1}

            />

 

        </>

    )

Error:

any

Property 'name' does not exist on type 'Option'.
Property 'name' does not exist on type 'string'.ts(2339)

View Problem

No quick fixes available

Answers (1)