View Source PlausibleWeb.Live.Components.ComboBox.StaticSearch (Plausible v0.0.1)

Default suggestion engine for the ComboBox component.

Assumes, the user have already queried the database and the data set is small enough to be kept in state and filtered based on external input.

Favours exact matches. Skips entries shorter than input. Allows fuzzy matching based on Jaro Distance.

Summary

Functions

@spec suggest(String.t(), [{any(), any()}]) :: [{any(), any()}]