Fork me on GitHub
#reagent
<
2016-06-15
>
tom00:06:27

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.

wombawomba00:06:58

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.

wombawomba00:06:02

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.

wombawomba00:06:05

How do I get around this?

blance00:06:14

Thanks alot @tom

blance00:06:21

I'll try it out

tom00:06:22

@wombawomba: can you give an example of the component and how you're setting the initial max-height: 0?

wombawomba00:06:21

I'm currently trying to work around it by changing *height in :component-did-mount rather than in the rendering function

wombawomba02:06:56

yeah, that didn't help 😞

escherize03:06:39

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?

escherize03:06:19

but I will actually checkout the source

escherize03:06:00

or at least the internal/external stuff.

pesterhazy08:06:43

@escherize: as far as I know, "controlled" textfields should update when you update the prop (which happen as you rerender)