How to turn off sorting of options in autocomplete?

Is there a way to turn off sorting of elements in autocomplete, or at least override it somehow?

I know there is option boost, but the documentation suggests rank -99 to 99, and I have more than 200 items in the autocomplete, and I would like to preserve the order of the items, not have them sorted alphabetically by label.

how to achieve that?

Never mind, I found compareCompletions.

Sounds like you’re looking for CompletionResult.filter though.

1 Like