Commit d9a28511 authored by Yoelis Acourt's avatar Yoelis Acourt

feat: disabled button when do database picked

parent 568bbd85
......@@ -23,6 +23,7 @@ import Gargantext.Components.ListSelection as ListSelection
import Gargantext.Components.ListSelection.Types as ListSelection
import Gargantext.Config.Utils (handleRESTError)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.UseFeatureFlag as Feature
import Gargantext.Sessions (Session(..))
import Gargantext.Types (FrontendError)
import Gargantext.Types as GT
......@@ -30,7 +31,6 @@ import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Hooks.UseFeatureFlag as Feature
here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField"
......@@ -751,11 +751,12 @@ submitButtonComponent = here.component "submitButton" cpt
cpt { errors, onSearch, search, selection, session } _ = do
search' <- T.useLive T.unequal search
selection' <- T.useLive T.unequal selection
{ datafield } <- T.read search
pure $
H.button
{ className: "btn btn-primary"
{ className: "btn btn-primary " <> if datafield == External Empty then "disabled" else ""
, "type": "button"
, "disabled": if datafield == External Empty then "true" else "false"
, on: { click: doSearch onSearch errors session selection' search' }
, style: { width: "100%" }
}
......
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