This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-15
Channels
- # admin-announcements (7)
- # alda (1)
- # aws-lambda (1)
- # beginners (12)
- # boot (20)
- # cider (59)
- # cljs-dev (4)
- # cljsrn (69)
- # clojure (232)
- # clojure-austin (3)
- # clojure-austria (1)
- # clojure-belgium (2)
- # clojure-canada (3)
- # clojure-dev (16)
- # clojure-greece (33)
- # clojure-nl (4)
- # clojure-quebec (12)
- # clojure-russia (12)
- # clojure-spec (27)
- # clojure-uk (38)
- # clojurescript (29)
- # community-development (7)
- # component (53)
- # core-async (16)
- # core-logic (1)
- # datascript (7)
- # datomic (11)
- # editors (7)
- # emacs (69)
- # hoplon (157)
- # keechma (1)
- # lambdaisland (2)
- # lein-figwheel (31)
- # leiningen (8)
- # mount (3)
- # off-topic (11)
- # om (23)
- # onyx (64)
- # planck (2)
- # re-frame (18)
- # reagent (21)
- # specter (118)
- # untangled (145)
- # yada (1)
What I'm doing in that case is writing a Form-3 (which uses create-class
) and exporting that name for use in JSX. When the state of the parent changes and it passes new props to the component, I use component-will-receive-props
, which accepts a map of properties sent in.
So I want to do a css transition on the max-height
of a component to get a sliding animation when the component appears. This means I need to first set the max-height
to 0
, and then set it to an appropriate (larger) number.
However, my naive approach of creating the component and then triggering a redraw via an atom update doesn't seem to work (probably because of the batched rendering in reagent); the resulting element never seems to have max-height: 0
.
How do I get around this?
@wombawomba: can you give an example of the component and how you're setting the initial max-height: 0
?
@tom: here's a simplified version: https://www.refheap.com/120327
I'm currently trying to work around it by changing *height
in :component-did-mount
rather than in the rendering function
yeah, that didn't help 😞
Anyone else have trouble with updating textboxes that are looking at ratoms? When I have a textbox (even who's :value
is @my-data), and I update my-data, the textbox doesn't change.... Is there a workaround for that?
@escherize: use re-com?
Looks like I can rip https://github.com/Day8/re-com/blob/master/src/re_com/misc.cljs#L41
@escherize: as far as I know, "controlled" textfields should update when you update the prop (which happen as you rerender)
out of the box, I mean. See https://facebook.github.io/react-native/docs/textinput.html