(children f xs)
Given a function and collection will add incremental meta :key
information
Example:
(:require [ant-man.core :as ant-man] [reagent.core :as r])
(def selection (r/atom nil)) (def example-collection [{:label "foo" :id 1} {:label "bar" :id 2}])
[ant-man/select {:on-change (fn [val] (reset! selection val)) :value @selection} (ant-man/children (fn [{:keys [label id]}] [ant-man/select-option {:value id} label]) example-collection)]
Given a function and collection will add incremental meta `:key` information Example: (:require [ant-man.core :as ant-man] [reagent.core :as r]) (def selection (r/atom nil)) (def example-collection [{:label "foo" :id 1} {:label "bar" :id 2}]) [ant-man/select {:on-change (fn [val] (reset! selection val)) :value @selection} (ant-man/children (fn [{:keys [label id]}] [ant-man/select-option {:value id} label]) example-collection)]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close