so i'm using a simple autocomplete method in polymer with
<paper-input autocomplete="on" name="stuff" list="stuffs"></paper-input>
with a simple list of items (tried both select and template elements to do this)
<datalist id="stuffs">
<option value="blah blah"/>
.
.
.
</datalist>
thing is, i wanna figure out a way to access the dynamic dropdown list of suggestions that appears during typing. is there actually a way for this?
I think your best bet then is to not use
datalist.Here's an example of a component I wrote for my own use:
_valueChangedobserves changes tosearchValueon input and toggles the collapse._listFilterfilters the items bound todom-repeatbased onsearchValue.The
#resultListor#collapseelement could be placed elsewhere for your own purposes.edit
I should point out that
choiceshere is an Array of Objects each of which has a name attribute which is how they are filtered. It could easily be altered to filter on a Array of Strings depending on what you're trying to achieve.