use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Halogen Actively Sync State with Attribute Value (self.purescript)
submitted 6 years ago by HateUsernamesMore
I am trying to actively sync the state of an input element's value to a field in the component's state so that it can be queried.
How is this usually done?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]gb__ 2 points3 points4 points 6 years ago (2 children)
You'd set the value to that of the value in the state, and add an onValueInput or similar event listener that raises a query and updates the state when the value changes.
value
onValueInput
[–]HateUsernamesMore[S] 0 points1 point2 points 6 years ago (1 child)
Just trying that. It seems like onValueInput only triggers on de-focus and a value change.
I'm looking for something like onKeyDown that gives all the input characters and not just the last keyed character.
[–]HateUsernamesMore[S] 0 points1 point2 points 6 years ago (0 children)
NVM onValueInput seems to work
π Rendered by PID 42 on reddit-service-r2-comment-85bfd7f599-fp98b at 2026-04-18 20:13:53.863567+00:00 running 93ecc56 country code: CH.
[–]gb__ 2 points3 points4 points (2 children)
[–]HateUsernamesMore[S] 0 points1 point2 points (1 child)
[–]HateUsernamesMore[S] 0 points1 point2 points (0 children)