Skip to content

v1.2.0-beta1 – Custom and Remote Filtering

Compare
Choose a tag to compare
@tomivirkki tomivirkki released this 23 Jan 13:15
· 928 commits to master since this release

New Features

Custom Filtering

  • filteredItems and filter 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 new filteredItems 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>

See Live Demos

Notable Changes

  • Screenreader support has been improved
  • selectedItem is no longer readOnly

Changes since v1.2.0-alpha1

  • Various bugfixes