SHARE
TWEET

Untitled

a guest Apr 14th, 2014 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; data returned by server
  2. [{:release/name Release five, :db/id 277076930200561} {:release/name Release six, :db/id 277076930200562} {:release/name Release two, :release/epic #{{:db/id 277076930200556}}, :release/startDate #inst "2015-01-01T00:00:00.000-00:00", :release/endDate #inst 2016-01-01T00:00:00.000-00:00", :db/id 277076930200558} {:release/name Release one, :release/epic #{{:db/id 277076930200554} {:db/id 277076930200556}}, :release/startDate #inst "2014-01-01T00:00:00.000-00:00", :release/endDate #inst "2015-01-01T00:00:00.000-00:00", :db/id 277076930200557} {:release/name Release four, :release/startDate #inst "2014-01-01T00:00:00.000-00:00", :release/endDate #inst "2014-12-01T00:00:00.000-00:00", :db/id 277076930200560} {:release/name Release three, :release/startDate #inst "2012-10-01T00:00:00.000-00:00", :db/id 277076930200559}]
  3.  
  4. ; clojurescript code to parse date
  5. om/IRenderState
  6.    (render-state [_ {:keys [edit-text editing on-edit]}]
  7.      (let [releases (:releases @app-state)]
  8.        ;(apply dom/ul nil (map #(dom/li nil (:release/name %)) releases))
  9.        (apply dom/div nil (map #(dom/div
  10.                                  #js {:className "release-container" :id (:db/id %)} (:release/startDate %)) releases)) ;does not display anything
  11.                                  #js {:className "release-container" :id (:db/id %)} (:release/name %)) releases)) ;works as expected and displays the name
  12.        ))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top