Meteor-Community-Packages/meteor-autocomplete

Optionally sort first matches starting with the query string

Offen

#43 geöffnet am 13.05.2014

 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)CoffeeScript (106 Forks)auto 404
enhancementgood first issue

Repository-Metriken

Stars
 (350 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Generally, users start typing the beginning of a word or a string. For instance, at the demo page, if I type AS, I'm more likely to be looking for ASBESTOS, rather than ACID WASTE (the example is in stark contrast to the nice fruity one on the left, but that's a different issue ;)

This "preferential matching" is mentioned briefly in the README, but it requires client side support besides a custom publish function. My initial commit implemented it on both sides, and with the added wisdom since, I can submit a patch to bring that option back in a simpler way.

As a further enhancement, records containing the query string starting from a word boundary could be prioritized between those that start with the query string, and the rest (e.g. D should prefer boiler blow Down to aciD vent.

Contributor Guide