ejmudi/react-autocomplete-hint

Customized priority order for hint

tekfyl opened this issue · 1 comments

Let's say we have three strings 'P1 xyz', 'P2 xyz' and 'P3 xyz'. The default display order for hint is lexicographic, that is, 'P1 xyz' then 'P2 xyz' and then 'P3 xyz'. So, if a person types in P in the checkbox the hint would be 'P1 xyz'.

It would have been great if there would have been an option of customized priority order for suggestions. For example P2 then P1 then P3. So, if a user types in 'P' the hint should be 'P2 xyz'. If the user types in 'P1' only then the hint should be 'P1 xyz'.

@tekfyl Nice thinking, that would be a useful addition.