This is what I have:
(defn view [cursor owner] (reify om/IDidMount (did-mount [_] (-> (js/$ ".dropdown-toggle") (.dropdown))) om/IRender (render [_] (dom/div #js {:className "dropdown"} (dom/button #js {:className "btn btn-default dropdown-toggle" :type "button" :id "dropdownMenu1"} "Dropdown" (dom/span #js {:className "caret"})) (dom/ul #js {:className "dropdown-menu" :role "menu" :ariaLabelledby "dropdownMenu1"} (dom/li #js {:role "presentation"} (dom/a #js {:role "menuitem" :tabIndex "-1" :href "#"} "Action")) (dom/li #js {:role "presentation"} (dom/a #js {:role "menuitem" :tabIndex "-1" :href "#"} "Another action")))))))
The problem is that as soon as the drop-down list opens, it no longer hides, as it should be when you click on it or somewhere else. Also keystrokes do not work. I believe that something important is missing here, what could it be? I am using bootstrap 3.1.1 and jquery 1.11.0.
Thanks.
twitter-bootstrap-3 om clojurescript
roboli
source share