vue-material icon indicating copy to clipboard operation
vue-material copied to clipboard

[Docs] [mdAutocomplete] example with Custom Template broken

Open noscript opened this issue 6 years ago • 4 comments

Steps to reproduce

  1. Visit https://vuematerial.io/components/autocomplete/.
  2. Scroll to Custom Template example.
  3. Click the input field and select any color from the drop down.

What is expected?

Selected Color: shows the selected color.

What is actually happening?

  • Drop down disappears.
  • Input field becomes empty.
  • Clicking the field again doesn't show drop down anymore.
  • Errors in browser console:
app.15aee5a6.js:6 TypeError: this.searchTerm.toLowerCase is not a function
    at d.matchText (app.15aee5a6.js:6)
    at d.o [as matchText] (app.15aee5a6.js:6)
    at app.15aee5a6.js:6
    at Array.filter (<anonymous>)
    at d.filterByObject (app.15aee5a6.js:6)
    at d.o [as filterByObject] (app.15aee5a6.js:6)
    at d.filteredStaticOptions (app.15aee5a6.js:6)
    at Js.get (app.15aee5a6.js:6)
    at Js.evaluate (app.15aee5a6.js:6)
    at d.filteredStaticOptions (app.15aee5a6.js:6)

Reproduction Link

https://vuematerial.io/components/autocomplete/

noscript avatar Mar 31 '19 14:03 noscript

It seems that the cause is the usage of actual objects as autocomplete options. I think the code expects a string, but the color example uses color objects and this causes the above problem.

mojo2012 avatar May 01 '19 18:05 mojo2012

Same here!

felipe-velloso avatar Oct 16 '19 00:10 felipe-velloso

Any updates here?

sgrund avatar May 27 '20 18:05 sgrund

I can reproduce it with version 1.0.0-beta-15.

ezawadzki avatar Jul 19 '21 13:07 ezawadzki