v1.2.0-beta1 – Custom and Remote Filtering
tomivirkki
released this
23 Jan 13:15
·
928 commits
to master
since this release
New Features
Custom Filtering
filteredItems
andfilter
can now be used to bypass the built-in client-side filtering
<vaadin-combo-box filtered-items="[[filteredItems]]" on-filter-changed="_filterChanged">
</vaadin-combo-box>
<script>
...
_filterChanged: function(e) {
var filter = e.detail.value;
this.filteredItems = elements.filter(function(el) {
return el.indexOf(filter) === 0;
});
}
...
</script>
Remote Filtering
loading
can be used to place a loading spinner while newfilteredItems
are being fetched async
<iron-ajax url="http://example.org/?filter=[[filter]]"
last-response={{response}}
loading="{{loading}}"
debounce-duration="500" auto>
</iron-ajax>
<vaadin-combo-box filtered-items="[[response]]" filter="{{filter}}" loading="[[loading]]">
</vaadin-combo-box>
Notable Changes
- Screenreader support has been improved
selectedItem
is no longerreadOnly
Changes since v1.2.0-alpha1
- Various bugfixes