This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-24
Channels
- # announcements (10)
- # aws-lambda (9)
- # babashka (14)
- # beginners (166)
- # calva (63)
- # chlorine-clover (4)
- # cider (40)
- # cljs-dev (4)
- # clojure (182)
- # clojure-europe (18)
- # clojure-italy (5)
- # clojure-nl (5)
- # clojure-spec (17)
- # clojure-uk (55)
- # clojurescript (11)
- # core-async (12)
- # cursive (23)
- # datascript (5)
- # datomic (19)
- # emacs (4)
- # fulcro (46)
- # graalvm (2)
- # hoplon (2)
- # joker (3)
- # juxt (1)
- # keechma (2)
- # leiningen (20)
- # malli (1)
- # meander (7)
- # nrepl (1)
- # off-topic (72)
- # pedestal (6)
- # re-frame (15)
- # reitit (7)
- # shadow-cljs (34)
- # sql (14)
- # testing (14)
- # tools-deps (11)
- # tree-sitter (1)
- # vim (14)
- # xtdb (19)
- # yada (3)
Does anyone tried to create editable cells in re-frame datatable??
Ah, probably this: https://github.com/kishanov/re-frame-datatable
It does not support natively for i got a cell and edit their value
That's what i'm trying to do right now
I create one. Now i'm trying to put my logic on it
I was able to create a text-field inside a cell, but i'm trying to make it more dynamic for noe
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"]])
(reg-event-db
:add-todos
todo-interceptors
(fn [todos [_ items]]
(reduce (fn [todos text]
(let [id (allocate-next-id todos)]
(assoc todos id {:id id :title text :done false})))
todos
items)))
I haven’t tested it, but hopefully it’s closeThanks 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