Skip to content

Commit

Permalink
Possibility to set comparator to TypeAheadInput
Browse files Browse the repository at this point in the history
If we don't want to sort or want to use custom sorting
  • Loading branch information
SweetDealer committed Sep 6, 2024
1 parent 0870305 commit 05b262f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsci-io/ui-essential",
"version": "1.0.69",
"version": "1.0.70",
"description": "Material Design components created for products built by elsci.io",
"main": "src/index.js",
"type": "module",
Expand Down
5 changes: 5 additions & 0 deletions src/TypeAheadInput/TypeAheadInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ export default class TypeAheadInput extends HTMLElement {
this.#lastValidValue = value;
}

/** @param {function|null} comparator */
set comparator(comparator) {
this.#dropdownElement.comparator = comparator;
}

set options(options) {
this.#dropdownElement.options = options;
this.#filterDatalist();
Expand Down

0 comments on commit 05b262f

Please sign in to comment.