Make `defaultFilter` publicly available (somehow?)
domchristie opened this issue · 5 comments
domchristie commented
Use case: use default filter method, with some additional conditions. For example, prevent suggesting previously used tags, it’d be nice to do something like:
filter: function (q, suggestion) {
return !_this.insignia.tags().includes(suggestion) && this._super.apply(this, arguments);
}
domchristie commented
(Actually this example may be better solved with a .remove(suggestion)
method?)
bevacqua commented
You can remove them as documented holding on to the element reference in .add, but exposing the default filter makes sense. pulls welcome
domchristie commented
You can remove them as documented holding on to the element reference in .add
Unfortunately I don’t have references to items added using the suggestions
option :/
bevacqua commented
Exposed in 1.2.0
domchristie commented
Great, thanks!