Hi
Trying to integrate https://github.com/nadbm/react-datasheet into a re-frame project.
`(defn main-panel []
(let [name (re-frame/subscribe [::subs/name])]
[:div
[:h1 "Hello from " @name]
[(r/adapt-react-class ReactDataSheet)
{:data [[{:val 1} {:val 2}] [{:val 3} {:val 4}]]
:valueRenderer #(:val %)}]]))`
This results in:
<div><h1>Hello from re-frame</h1><span tabindex="0" class="data-grid-container"><table class="data-grid"><tbody><tr><td class="cell"><span class="value-viewer"></span></td><td class="cell selected"><span class="value-viewer"></span></td></tr><tr><td class="cell"><span class="value-viewer"></span></td><td class="cell"><span class="value-viewer"></span></td></tr></tbody></table></span></div>
So no data is visible. Am I doing something wrong?
The :data
value gets deeply converted into JS arrays and objects.
The :valueRenderer
function receives those JS objects and not CLJS maps.
At least, that's how it seems after a minute of looking at your code.