warns about how many are visible
This commit is contained in:
@@ -52,7 +52,6 @@
|
|||||||
(re-frame/reg-event-db
|
(re-frame/reg-event-db
|
||||||
::change
|
::change
|
||||||
(fn [db [_ form & path-pairs]]
|
(fn [db [_ form & path-pairs]]
|
||||||
(println "CHANGING" path-pairs)
|
|
||||||
(reduce
|
(reduce
|
||||||
(fn [db [path value]]
|
(fn [db [path value]]
|
||||||
(assoc-in db (into [::forms form :data] path) value))
|
(assoc-in db (into [::forms form :data] path) value))
|
||||||
|
|||||||
@@ -120,6 +120,9 @@
|
|||||||
include-headers (r/atom true)
|
include-headers (r/atom true)
|
||||||
table-form (r/atom nil)]
|
table-form (r/atom nil)]
|
||||||
(fn [{:keys [headings value on-change row-filter]}]
|
(fn [{:keys [headings value on-change row-filter]}]
|
||||||
|
[:div
|
||||||
|
(when (> (count value) 100)
|
||||||
|
[:div.notification "Showing first 100 of " (count value)])
|
||||||
[:form.form
|
[:form.form
|
||||||
(if value
|
(if value
|
||||||
[:div
|
[:div
|
||||||
@@ -128,17 +131,18 @@
|
|||||||
[:tr
|
[:tr
|
||||||
(list
|
(list
|
||||||
(for [[heading-name _] headings]
|
(for [[heading-name _] headings]
|
||||||
[:th heading-name]))
|
^{:key heading-name}[:th heading-name]))
|
||||||
(list
|
(list
|
||||||
(for [[heading-name _] read-only-headings]
|
(for [[heading-name _] read-only-headings]
|
||||||
[:th heading-name]))]]
|
^{:key heading-name} [:th heading-name]))]]
|
||||||
|
[:tbody
|
||||||
(list
|
(list
|
||||||
(for [[index row] (map vector (range )value)
|
(for [[index row] (map vector (range ) (take 100 value))
|
||||||
:when (row-filter row)]
|
:when (row-filter row)]
|
||||||
[:tr
|
^{:key index} [:tr
|
||||||
(list
|
(list
|
||||||
(for [[_ k] headings]
|
(for [[_ k] headings]
|
||||||
[:td
|
^{:key k} [:td
|
||||||
[:input.input {:on-change (fn [x]
|
[:input.input {:on-change (fn [x]
|
||||||
(.preventDefault x)
|
(.preventDefault x)
|
||||||
(on-change
|
(on-change
|
||||||
@@ -146,8 +150,8 @@
|
|||||||
:value (get row k)}]]))
|
:value (get row k)}]]))
|
||||||
(list
|
(list
|
||||||
(for [[_ k] read-only-headings]
|
(for [[_ k] read-only-headings]
|
||||||
[:td.expandable
|
^{:key k} [:td.expandable
|
||||||
(get row k)]))]))]
|
(get row k)]))]))]]
|
||||||
children]
|
children]
|
||||||
[:div
|
[:div
|
||||||
|
|
||||||
@@ -168,7 +172,7 @@
|
|||||||
(map (fn [[_ k] v] [k v]) headings)
|
(map (fn [[_ k] v] [k v]) headings)
|
||||||
(into {}))))))}
|
(into {}))))))}
|
||||||
"Parse"]
|
"Parse"]
|
||||||
])])))
|
])]])))
|
||||||
|
|
||||||
(def balance-sheet-content
|
(def balance-sheet-content
|
||||||
(with-meta
|
(with-meta
|
||||||
|
|||||||
Reference in New Issue
Block a user