nunntom / elm-ui-select / Select.Filter

Filter the list of options based on the input value

Type


type alias Filter a =
Internal.Filter.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).

startsWithThenContains : Filter a

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 -> Basics.Bool) -> Filter a

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

customWithSort : (String -> a -> Maybe Basics.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.