Are there any built in auto-complete input components for Polymer 1.0? [closed]

 ̄綄美尐妖づ 提交于 2019-11-30 11:17:32

Vaadin's combo box looks pretty solid:

There is also Ellipticaljs's Paper Autocomplete, with a possible alternative md-autocomplete in the works.

You can find more autocomplete elements by searching at http://customelements.io.

For now, I've settled on using HTML5 datalists in conjunction with a modified <paper-input> control (I've submitted a pull request to the Github repo to merge those changes back into the master branch). All those changes do is persist the list attribute to the inner <iron-input> control so that it can utilize an HTML5 datalist.

Definitely not ideal, but, in the short-term, it'll function as a placeholder in place of a real typeahead control.

I also built a quick custom validator that iterates over the same Array collection as what I use in my datalist so that the <paper-input> control knows if the current value is a selectable (valid) value or not.

Edit: The best place I've seen to bring up a first-party developed autocomplete is on the PolymerElements/paper-elements repo on GitHub. I'd discuss at https://github.com/PolymerElements/paper-elements/issues/26.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!