mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
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:
@ -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 ->
|
||||
|
Reference in New Issue
Block a user