>I’ve noticed that calling reagent/flush
after you store the input in the atom usually solves the issue
Where would you call this in keechma, if the input is controlled directly by the global state? I tried calling it in the dispatcher
after app-db-atom is swapped, but it doesn't seem to work
hm, I think that should work
can you copy / paste that part of code?
@mihaelkonjevic Not quite sure what part of the code to paste... ok here goes
hm... let me come up with a minimal example
there’s another thing that might be causing this, are you sure that the input element is not being re-created every time you update the value? Easiest way to determine this is to add some style through the dev tools and change the value
Nope, the style persists
ok, that’s good
this code looks like it should work
that’s interesting
I’m trying to create a test project for this, how does your project.clj file look like?
my project.clj has a bit of an identity crisis as far as names. Here:
@urbank I definitely see this behavior, working on it
@mihaelkonjevic Cool, thanks!
@urbank so, the way I got it to work correctly is by passing the :input
prop to semantic ui component (it’s supported by SemanticUI)
you don’t need reagent/flush
with that
Yup that seems to work. Relatively elegant as well. Thanks for taking the time! Any idea why reagent/flush
wouldn't work in the updater function?
I think it has something to do with the fact that the semantic ui input is wrapped with an outer div which is in React land, instead of reagent land, so reagent probably can’t force re-render. That’s just a guess though