0

Say I had the following custom textarea, how can I pass the etextarea a Cell and have both the :change and the :value work?

(defelem etextarea
  [temp-cell]
  (textarea :value temp-cell 
     :change #(reset! temp-cell @%)))

The code can be modified to include '@temp-cell' or whatever but I have tried many things and whether I pass it '(cell= cell-to-pass)' or 'cell-to-pass' it doesn't seem to work.

phlie
  • 1,335
  • 3
  • 10
  • 19

1 Answers1

1
(defelem etextarea
         [_ [temp-cell]]
         (textarea :value temp-cell
                   :change (fn [evt]
                               (reset! temp-cell @evt))))
akond
  • 15,865
  • 4
  • 35
  • 55
  • What if, the textarea was already in a cell ie. (cell= (if key! (p "Random text") (textarea :value temp-cell :change (fn [evt] (reset! temp-cell @evt)))? – phlie Oct 07 '17 at 18:54