Meteor-Community-Packages/meteor-autocomplete

Optionally sort first matches starting with the query string

Ouverte

#43 ouverte le 13 mai 2014

 (9 commentaires) (0 réaction) (0 personne assignée)CoffeeScript (106 forks)auto 404
enhancementgood first issue

Métriques du dépôt

Stars
 (350 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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.

Guide contributeur