Fork me on GitHub
#rum
<
2019-09-07
>
sova-soars-the-sora14:09:33

Hi! how do I disable a button once it has been clicked once?

Jan K17:09:46

check out the "counter" example on https://github.com/tonsky/rum

Jan K17:09:36

instead of displaying the number of clicks, you can make it render in the appropriate enabled/disabled state

sova-soars-the-sora19:09:41

[:button.butans {:disabled (if (= true @quiz-submit-pressed) true false) looks OK?

sova-soars-the-sora19:09:22

Oh, it won't actually update the disabled state that way o.o

sova-soars-the-sora19:09:26

unless it draws again

sova-soars-the-sora19:09:40

well, even drawing again it did'n change the components...

sova-soars-the-sora19:09:22

Oh hey I got it! I forgot to wrap the atom in (rum/react ~ )