Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
How to use. selectOption() in autocomplete?

On page load I want to initialize the autocoplete with one specific option. I am using MaterializeCSS The documentation says

Select a specific autocomplete options.
Arguments
Element: Element of the autocomplete option.
instance.selectOption(el);

I tried

//autocomplete.selectOption("Radek")
//autocomplete.selectOption({"Radek"})
autocomplete.selectOption({"Radek":null})

but nothing worked. Could you suggest how to select autocomplete option programaticaly?

 var elemOptions = {
         data: {
            "Radek Surname ": null,
            "Radek": null,
            "Radoslav": null
        },
      minLength : 2,
    }
var elemAutomplete = document.getElementById('autocomplete-input1')
var autocomplete = M.Autocomplete.init(elemAutomplete, elemOptions);

//autocomplete.selectOption("Radek")
//autocomplete.selectOption({"Radek"})
autocomplete.selectOption({"Radek":null})

and working jsFiddle

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!