diff --git a/src/re_com/simple_v_table.cljs b/src/re_com/simple_v_table.cljs index b24577db..8ebeab33 100644 --- a/src/re_com/simple_v_table.cljs +++ b/src/re_com/simple_v_table.cljs @@ -220,7 +220,8 @@ [:span "one element for each column in the table. Must contain " [:code ":id"] "," [:code ":header-label"] "," [:code ":row-label-fn"] "," [:code ":width"] ", and " [:code ":height"] - ". Optionally contains " [:code ":sort-by"] ", " [:code ":align"] + ". Optionally contains " [:code ":sort-by"] ", " [:code ":align"] ", " + [:code ":on-export-row-label-fn"] ", " " and " [:code ":vertical-align"] ". " [:code ":sort-by"] " can be " [:code "true"] " or a map optionally containing " [:code ":key-fn"] " and " [:code ":comp"] " ala " [:code "cljs.core/sort-by"] "."]} diff --git a/src/re_com/util.cljs b/src/re_com/util.cljs index 53a38487..25783262 100644 --- a/src/re_com/util.cljs +++ b/src/re_com/util.cljs @@ -231,7 +231,7 @@ (defn table->tsv [columns rows] (let [header-value-fn (some-fn :export-header-label :header-label (comp name :id)) - row-value-fn (some-fn :row-export-fn :row-label-fn :id) + row-value-fn (some-fn :on-export-row-label-fn :row-label-fn :id) row->cells (apply juxt (map row-value-fn columns))] (->> rows (map row->cells) diff --git a/src/re_demo/simple_v_table_sales.cljs b/src/re_demo/simple_v_table_sales.cljs index 0271ecb8..fce8fcfc 100644 --- a/src/re_demo/simple_v_table_sales.cljs +++ b/src/re_demo/simple_v_table_sales.cljs @@ -326,8 +326,8 @@ [{:id :id :header-label "Code" :row-label-fn :id :width 70 :align "center" :vertical-align "middle" :export? false} {:id :region :header-label "Region" :row-label-fn :region :width 100 :align "left" :vertical-align "middle"} {:id :name :header-label "Name" :row-label-fn :person :width 100 :align "left" :vertical-align "middle" :sort-by {}} - {:id :email :header-label "Email" :row-label-fn email-row-label-fn :width 200 :align "left" :vertical-align "middle" :row-export-fn :email} - {:id :method :header-label "Method" :row-label-fn method-row-label-fn :width 100 :align "center" :vertical-align "middle" :row-export-fn (comp name :method)} + {:id :email :header-label "Email" :row-label-fn email-row-label-fn :width 200 :align "left" :vertical-align "middle" :on-export-row-label-fn :email} + {:id :method :header-label "Method" :row-label-fn method-row-label-fn :width 100 :align "center" :vertical-align "middle" :on-export-row-label-fn (comp name :method)} {:id :sales :header-label "Sales" :row-label-fn #(str "$" (:sales %)) :width 100 :align "right" :vertical-align "middle" :sort-by {:key-fn :sales}} {:id :units :header-label "Units" :row-label-fn :units :width 100 :align "right" :vertical-align "middle" :sort-by true}] :fixed-column-count @fixed-column-count