 
 (enable-console-print!)
 
-(q/defcomponent User
+(q/defcomponent Row
   [data header-meta]
   (apply d/tr {}
-         (map (fn [header] (d/td {} (if(get header :renderer)
-                                      (#((get header :renderer) (get data (get header :key))))
-                                      (get data (get header :key)))))
-              (partial header-meta))))
+         (map (fn [header] (d/td {} ((get header :renderer identity)
+                                     ((:key header) data))))
+              header-meta)))
 
 (defn render-header [header]
   (d/thead {}

  (fn [event reactid]
    (render-grid (f column-key))))

(defn create-email-column-renderer [column-key]
  (fn [key]
    (d/a {:className "byline" :href key} key)))

(def my-data {:data [{:name "John Doe"
                      :email "user@email.com"

                     {:name "Frank Bølviken"
                      :email "frank.bolviken@gmail.com"
                      :country "Norway"}
                      {:name "Jazee"
                      :email "jz@gmail.com"
                      :country "Norway"}
                     {:name "SS Assum"
                      :email "sss.bolviken@gmail.com"
                      :country "France"}]
              :meta {:header
                     [{:key :email
                       :title "Email"
                       :className "email"
                       :onClick (create-sorter column-sorter :email)
                       :renderer link-renderer}
                      {:key :name
                       :title "Name"
                       :onClick (create-sorter column-sorter :name)}
                      {:key :country
                       :title "Country"
                       :onClick (create-sorter column-sorter :country)
                       }]
                     :group-by :country}})

(render-grid  my-data)
