Meteor-Community-Packages/meteor-autocomplete

Optionally sort first matches starting with the query string

Aberta

#43 aberto em 13 de mai. de 2014

 (9 comentários) (0 reação) (0 responsável)CoffeeScript (106 forks)auto 404
enhancementgood first issue

Métricas do repositório

Stars
 (350 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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.

Guia do colaborador