Fork me on GitHub
Ramon Rios16:03:17

Does anyone tried to create editable cells in re-frame datatable??


What do you mean by editable cells?


Or by "re-frame datatable", for that matter.

Ramon Rios17:03:13

It does not support natively for i got a cell and edit their value


What if you use a custom cell renderer? Would that work?

Ramon Rios17:03:07

That's what i'm trying to do right now

Ramon Rios11:03:15

I create one. Now i'm trying to put my logic on it

Ramon Rios11:03:03

I was able to create a text-field inside a cell, but i'm trying to make it more dynamic for noe

Travis Smith23:03:58

If anyone has familiarity with todomvp, I could use some help. I'm trying to create a new event based on :add-todo such that I could add multiple entries at once. This is because I would like to load the checklist with items when a user presses a button. I'm new to Clojure/CLJS, so progress is slow. Here is the function in question: ;; usage: (dispatch [:add-todo "a description string"]) (reg-event-db :add-todo todo-interceptors (fn [todos [_ text]] (let [id (allocate-next-id todos)] (assoc todos id {:id id :title text :done false}))))


you’ll probably want to rename the event. an event :add-todos might look like:

;; usage (dispatch [:add-todos ["first" "second" third"]])
  (fn [todos [_ items]]
    (reduce (fn [todos text]
              (let [id (allocate-next-id todos)]
                (assoc todos id {:id id :title text :done false})))
I haven’t tested it, but hopefully it’s close

Travis Smith20:03:17

Thanks very much. I'm going to try this out today.


alternatively, you could have your button dispatch multiple :add-todo events

(doseq [text ["first" "second" "third"]]
  (dispatch [:add-todo text]))
not sure which is preferable

🙂 4