keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
urbank 2017-06-02T14:07:34.051252Z

>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

mihaelkonjevic 2017-06-02T14:10:24.112614Z

hm, I think that should work

mihaelkonjevic 2017-06-02T14:10:59.125091Z

can you copy / paste that part of code?

urbank 2017-06-02T14:18:52.299334Z

@mihaelkonjevic Not quite sure what part of the code to paste... ok here goes

urbank 2017-06-02T14:20:42.341140Z

hm... let me come up with a minimal example

mihaelkonjevic 2017-06-02T14:23:00.393527Z

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

urbank 2017-06-02T14:23:54.414013Z

Nope, the style persists

mihaelkonjevic 2017-06-02T14:24:00.416344Z

ok, that’s good

mihaelkonjevic 2017-06-02T14:24:09.419637Z

this code looks like it should work

mihaelkonjevic 2017-06-02T14:24:22.424740Z

that’s interesting

mihaelkonjevic 2017-06-02T14:30:04.557024Z

I’m trying to create a test project for this, how does your project.clj file look like?

urbank 2017-06-02T14:33:39.639673Z

my project.clj has a bit of an identity crisis as far as names. Here:

mihaelkonjevic 2017-06-02T15:06:22.411586Z

@urbank I definitely see this behavior, working on it

urbank 2017-06-02T15:10:37.511871Z

@mihaelkonjevic Cool, thanks!

mihaelkonjevic 2017-06-02T15:40:43.195969Z

@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)

mihaelkonjevic 2017-06-02T15:41:28.212443Z

you don’t need reagent/flush with that

urbank 2017-06-02T15:47:12.340860Z

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?

mihaelkonjevic 2017-06-02T15:48:36.373039Z

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