Improve selecting tags in the dropdown a bit

This is some low hanging fruit, related to #573, #960. At least we see
now the category and the filter is applied to it as well.
This commit is contained in:
eikek
2022-01-14 23:49:08 +01:00
parent 3841b4aadd
commit 348fd50297
2 changed files with 36 additions and 7 deletions

View File

@ -22,15 +22,19 @@ import Util.List
makeDropdownModel : Comp.Dropdown.Model Tag
makeDropdownModel =
Comp.Dropdown.makeModel
{ multiple = True
, searchable = \n -> n > 0
}
let
init =
Comp.Dropdown.makeModel
{ multiple = True
, searchable = \n -> n > 0
}
in
{ init | searchWithAdditional = True }
tagSettings : String -> DS.DropdownStyle -> Comp.Dropdown.ViewSettings Tag
tagSettings placeholder ds =
{ makeOption = \tag -> { text = tag.name, additional = "" }
{ makeOption = \tag -> { text = tag.name, additional = Maybe.withDefault "" tag.category }
, labelColor =
\tag ->
\settings ->