Skip to content
Snippets Groups Projects
Verified Commit 28a500e4 authored by Adam Reichold's avatar Adam Reichold
Browse files

Simplify root filter implemention via button instead of input.

parent a8cb0478
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ module View.Filter.Root exposing (viewAllRoots)
import Config exposing (showOptionsCount, tabOrder)
import Data exposing (Msg(..), Root(..), getRoot)
import Html exposing (a, div, h1, input, nav, text)
import Html exposing (a, button, div, h1, nav, text)
import Html.Attributes exposing (href, style, tabindex, type_, value)
import Html.Events exposing (onClick)
import Html.Events.Extra exposing (onClickPreventDefault)
......@@ -178,7 +178,7 @@ type Mode
| Removed
viewComponent mode value1 extraValue onClick1 =
viewComponent mode label extraLabel onClick1 =
let
color =
case mode of
......@@ -222,15 +222,12 @@ viewComponent mode value1 extraValue onClick1 =
Removed ->
fonts.displaySmRegular
in
input
button
([ tabindex tabOrder.filters
, type_ "button"
, role "treeitem"
, ariaSelected (mode == Selected)
, ariaLabel value1
, value (value1 ++ extraValue)
, ariaLabel label
, onClick onClick1
, style "white-space" "normal"
, style "cursor" "pointer"
, style "padding" (sizes.size1_5 ++ " " ++ sizes.size3)
, style "color" color
......@@ -239,7 +236,7 @@ viewComponent mode value1 extraValue onClick1 =
]
++ font
)
[]
[ text (label ++ extraLabel) ]
isPendingSet root label =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.