Fork me on GitHub
#reagent
<
2015-07-01
>
escherize13:07:47

I've got a question: I want to have an expanding table (let's say html table). Each row in the table takes a map M with keys K. Usually the row will show a few keys from M, but when I click the row it should show all the keys.

escherize13:07:15

If i wasn't using a table, I would use something like:

[:div [show-some-keys M] 
      (when condition? [other-keys M]]

escherize13:07:53

but since it's a table, I'm returning a tr

escherize13:07:05

I'm calling display-m from here:

[:table [:tbody (for [M data] [display-m M] )]]
So I am forced to return one tr, but i'd really like to be able to return two trs, one that's hidden unless condition?.

escherize15:07:46

Welp, went with divs so i can group them however and return "1" thing like: [:div thing1 thing2]