Passing a Cell to a defelem Hoplon

51 views Asked by At

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.

1

There are 1 answers

1
akond On BEST ANSWER
(defelem etextarea
         [_ [temp-cell]]
         (textarea :value temp-cell
                   :change (fn [evt]
                               (reset! temp-cell @evt))))