Debug unresponsive button press for selectKey
Observed problem: Tapping "C major, A minor" key, which LPC sets by default, does not unset it. Bug: handleClick passed the relativeMinor Key but the default value in State.Model is the C Major key. We would toggled b/w [Cmajor] -> [Cmajor,Aminor], and because toggled checked if either Cmajor or Aminor was present, it was always true. Solution: Check relativeMajor to set toggled.
This commit is contained in:
parent
441fe3e32e
commit
82ebc0ad19
1 changed files with 2 additions and 2 deletions
|
@ -28,9 +28,9 @@ selectKey model { relativeMajor, relativeMinor } =
|
||||||
div [ class "flex pt-0" ]
|
div [ class "flex pt-0" ]
|
||||||
[ UI.textToggleButton
|
[ UI.textToggleButton
|
||||||
{ label = buttonLabel relativeMajor relativeMinor
|
{ label = buttonLabel relativeMajor relativeMinor
|
||||||
, handleClick = State.ToggleKey relativeMinor
|
, handleClick = State.ToggleKey relativeMajor
|
||||||
, classes = [ "flex-1" ]
|
, classes = [ "flex-1" ]
|
||||||
, toggled = active relativeMinor || active relativeMajor
|
, toggled = active relativeMajor
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue