Heya! I'm new to Retool. So far so good, but I'm running into a problem that seems so basic that I'm afraid I'm just not approaching the right way. I've done a bit of digging online, but no luck yet so I'm posting here.
I'm building an app for users to allocate a certain amount of 'votes' to a list of options. Each option is a Number Input and when the user enters a value in the input field, I would like to deduct that number from their total number of votes.
UI looks like this:
So... my thought was to register an Change handler on the Number Input, grab the new value and update my temporary state.
I can't figure out how to grab this new value. I would expect there to be a data structure associated with the Change event, but I haven't found that in the docs. I see there is an
event variable that is available, but it seems a little 'internal'. Similarly, there is
self, but I loose the reference to the element that triggered the change.
What's the correct way to handle this?
Thanks for any help!