Skip to content

Commit 87f9d13

Browse files
author
Andika Demas Riyandi
committed
Fixed: Bug on cell click
1 parent 7c29915 commit 87f9d13

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src-ui.v3/src/Main.hs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -645,13 +645,12 @@ renderRow pn' hcvs pitrIdxstate wip inQueue ppV pcV t u cs = do
645645

646646
reportDetailWidget :: (SupportsServantReflex t m, MonadFix m, PostBuild t m, DomBuilder t m, Reflex t, MonadHold t m, Adjustable t m) => Dynamic t (Maybe (PkgN,Ver,CompilerID,PkgIdxTs)) -> m ()
647647
reportDetailWidget dynCellId = do
648-
649648
evDetails <- getPackageReportDetail (maybe (Left "") (Right . (^. _1)) <$> dynCellId)
650649
(maybe (Left "") (Right . (^. _4)) <$> dynCellId)
651650
(maybe (Left "") (Right . (^. _2)) <$> dynCellId)
652651
(maybe (Left "") (Right . (^. _3)) <$> dynCellId)
653652
(updated dynCellId $> ())
654-
653+
655654
dynRepTy <- holdDyn CRTna (crdType <$> evDetails)
656655
dynSErr <- holdDyn "" ((fromMaybe "" . crdSolverErr) <$> evDetails)
657656
dynSols <- holdDyn [] ((fromMaybe [] . crdUnits) <$> evDetails)
@@ -669,23 +668,20 @@ reportDetailWidget dynCellId = do
669668
el "h3" (dynText $ (\xs -> tshow (length xs) <> " solution(s) found") <$> dynSols)
670669

671670
_ <- simpleList dynSols $ \dynYs -> elAttr "div" ("style" =: "border-style: solid") $ do
672-
simpleList (Map.toList <$> dynYs) $ \dynY -> elAttr "div" ("style" =: "border-style: dotted") $ do
673-
evUpd <- getPostBuild
674-
671+
listWithKey dynYs $ \uuid dynY -> elAttr "div" ("style" =: "border-style: dotted") $ do
672+
evPB0 <- getPostBuild
673+
evInfo <- getUnitInfo (Right <$> constDyn uuid) evPB0
675674
el "h4" $ do
676-
el "tt" $ display (fst <$> dynY)
675+
el "tt" $ display (constDyn uuid)
677676
text " "
678677
el "em" $ do
679678
text "["
680-
dynText (maybe "?" (T.drop 2 . tshow) . snd <$> dynY)
679+
dynText (maybe "?" (T.drop 2 . tshow) <$> dynY)
681680
text "]"
682681

683-
evInfo <- getUnitInfo (Right . fst <$> dynY) evUpd
684-
685682
dynLogmsg <- holdDyn "-" ((fromMaybe "" . uiiLogmsg) <$> evInfo)
686683

687-
elDynAttr "pre" (st2attr . snd <$> dynY) (dynText dynLogmsg)
688-
684+
elDynAttr "pre" (st2attr <$> dynY) (dynText dynLogmsg)
689685
pure ()
690686

691687
where

0 commit comments

Comments
 (0)