Rustam Pulodov

Rustam Pulodov

  • 1.3k
  • 282
  • 1.3k

react-bootstrap-typeahead

Aug 31 2022 10:50 AM

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)