Commit cb315f70 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[ngrams] move search up the tree

Now focus works.
parent bfc1b4b2
......@@ -291,10 +291,6 @@ searchInputCpt = R.hooksComponent "G.C.NT.searchInput" cpt
, placeholder: "Search"
, type: "value" }
toggleMaybe :: forall a. a -> Maybe a -> Maybe a
toggleMaybe _ (Just _) = Nothing
toggleMaybe b Nothing = Just b
-- NEXT
data Action'
= SetParentResetChildren' (Maybe NgramsTerm)
......@@ -353,7 +349,8 @@ loadedNgramsTableSpecCpt = R.hooksComponent "G.C.NT.loadedNgramsTable" cpt
pure $ R.fragment $
autoUpdate <> resetSaveButtons <> [
T.table { colNames
search
, T.table { colNames
, container: tableContainer { dispatch: performAction
, ngramsChildren
, ngramsParent
......
......@@ -300,3 +300,8 @@ foreign import _setCookie :: EffectFn1 String Unit
setCookie :: String -> Effect Unit
setCookie = runEffectFn1 _setCookie
focus :: Nullable R.Element -> Effect Unit
focus nEl = case toMaybe nEl of
Nothing -> pure unit
Just el -> el ... "focus" $ []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment