Fork me on GitHub
#re-frame
<
2015-11-27
>
henryw37415:11:21

Hi everyone. I’d like a keypress, e.g. F3 to pop open a search dialog so the user can start typing away in it. now, i have a way of doing this, but it most definitely feels hacky… if anyone has a better suggestion I’d be interested to hear. so, first up this is a re-com/single-dropdown component which i have copied… so now the drop-showing? ratom is passed in rather than created and closed-over within the component. the drop-showing? ratom is a var in an ns, initially false, and a document event handler toggles this var true/false, as do events from within the component. so… 2 things I don’t like, 1. I’ve hacked about with a library component and 2. for the first time i have some global state outside re-frame.db/app-db. i could put the state in the app-db and have all places that currently toggle the ratom call a re-frame event handler… but that means hacking the component even more. ideas welcome...