nunntom/elm-ui-select/4.0.0

Select.Filter

Filter the list of options based on the input value

Type

type alias Filter a =
Filter a

A Filter

Filters

startsWith : Filter a

Keep all options whose string value starts with the input value (case insensitive).

contains : Filter a

Keep all options whose string value contains the input value (case insensitive).

Keep all options whose string value starts with or contains the input value (case insensitive). The items that start with the value appear at the top.

custom : (String -> a -> Bool) -> Filter a

Create a simple custom filter. Keep all values that satisfy the test.

customWithSort : (String -> a -> Maybe Int) -> Filter a

Create a custom filter that sorts. Keep all values that return a maybe and sort in ascending order based on the score.