Fork me on GitHub

I've got a re-com datepicker component working correctly. However, when I change the component to datepicker-dropdown, the component, rather than showing a dropdown, disappears. Any idea why this behavior would happen? The model properties are the same for each, so I can't figure out why the dropdown wouldn't work.

Braden Shepherdson03:03:27

bad position: absolute? maybe it needs a position: relative container somewhere?


I added a :div around the component and it showed up. That seems relatively unintuitive to me. Does anyone have an explanation?


CSS issues, as Braden described. Maybe positioning, maybe something else. Your best bet it to inspect it with DevTools when it disappears.


And if you create a minimal reproducible example, please create an issue in re-com's repo with it.


Can we add two events in :on-click function ?


It's better to combine then in another event. Two ways to do that: • Extract the functionality that the two existing events and the :on-click event share into functions and use those functions in each of the three events • Make the re-frame event that you dispatch on :on-click in turn dispatch those two events


so we cannot do it in a do block?


You can. But it's the worst solution. The solution with event functionality reuse is the best one. The solution with a third event using the first two is somewhat of a middle ground.