Skip to content

Instantly share code, notes, and snippets.

@jonase
Created July 27, 2011 10:22
Show Gist options
  • Save jonase/1109097 to your computer and use it in GitHub Desktop.
Save jonase/1109097 to your computer and use it in GitHub Desktop.
(ns uitest
(:require [goog.ui.ComboBox :as ComboBox]
[goog.ui.ComboBoxItem :as ComboBoxItem]
[goog.dom :as dom]))
(defn ^:export add-combo-box []
(let [combo-box (goog.ui/ComboBox.) ;; <-- ?
items ["A" "B" "C"]
elem (dom/getElement "combobox")]
(doseq [item items]
(.addItem combo-box (goog.ui/ComboBoxItem. item))) ;; <-- ?
(doto combo-box
(.setUseDropdownArrow true)
(.render elem))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment