This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-29
Channels
- # admin-announcements (2)
- # beginners (20)
- # boot (139)
- # cider (6)
- # clara (1)
- # cljs-dev (7)
- # cljsrn (4)
- # clojure (160)
- # clojure-berlin (1)
- # clojure-canada (6)
- # clojure-gamedev (1)
- # clojure-japan (7)
- # clojure-russia (14)
- # clojure-spec (90)
- # clojure-uk (10)
- # clojurescript (73)
- # clojutre (1)
- # conf-proposals (8)
- # crypto (67)
- # cursive (9)
- # datomic (6)
- # editors-rus (1)
- # events (1)
- # figwheel (6)
- # funcool (2)
- # hoplon (19)
- # instaparse (37)
- # kekkonen (4)
- # lein-figwheel (2)
- # leiningen (5)
- # luminus (1)
- # off-topic (1)
- # om (10)
- # onyx (60)
- # protorepl (2)
- # re-frame (81)
- # reagent (10)
- # ring-swagger (15)
- # rum (6)
- # specter (17)
- # test-check (10)
- # uncomplicate (31)
- # untangled (12)
- # yada (6)
@jumblerg thanks for the latest hoplon ui commits (submit & route)! @chark has also found the reason why the password input type didn't work; that's what the latest pull request is about (the other commits are just "technical - fckin git - noise"; sorry for that) it means we can sync our hoplon/ui fork with the official again.
some reference of debounce: https://en.wikipedia.org/wiki/Switch#Contact_bounce since i did quite some micro-controller programming, to me debounce means delay acting on an event until we are sure it has happened (a switch press for example). it seems one major difference from throttle is that throttle reacts immediately.
I have a list element which is structured like this: (li … (span … ) (div … ))
. Now, when span
is clicked I’d like to toggle the visibility of the following div
. I thought about something like next().toggle()
but I’m struggling with the interop syntax… 💩 Any suggestions?
@beatngu13 there is a much more hoplon way of doing that 🙂
(defc my-toggler false)
(li
(span :click #(swap! my-toggler not))
(div :toggle my-toggler))
@alandipert is right, thats probably what you want @beatngu13
i haven't had a chance yet to try our app w/ the hoplon 7 goodness
hope to achieve that this week so we can cut v7
Thanks @flyboarder and @alandipert. I should have mentioned that the list is created dynamically with many li
items. I could create a map (e.g. :id toggle-state
) on the fly, but this might create many cells. That’s why I thought something like next().toggle()
would be easier. What do you think?
@beatngu13 so in that case I would still go with alans version, except create a local cell for each li
litem
@beatngu13 when someone clicks do you want to remove the element from the original list?
span
contains general informations and the div
opens a detail view which I’d like to toggle when the user clicks on the list item.
You can see the function that creates the li
item here: https://github.com/beatngu13/cljs-praxisboerse/blob/master/src/cljs_praxisboerse/templates.cljs#L5
made a bigger example, https://gist.github.com/alandipert/9f5a64858eb244dec78d2a9238ad0152
@beatngu13 in your case i would recommend adding an argument to your offer-list-item
function
that takes a cell of whether or not to display details
so that when you're "iterating" in a for-tpl
you can pass it a cell
alternatively you could move creating/managing the cell into your function
Great, thanks @alandipert I'll try that out.