Replies: 1 comment 1 reply
-
Hi @pglevy, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm just starting to play around with Reflex and was going through the Chat App tutorial, but I'm having trouble with the form field behavior when trying to use a label.
Here's a reference on codepen of what I'm trying to achieve: a text input with a programmatically associated label (so the input receives focus when you click the label) that you can interact with by typing into it.
I started with this basic example, which seems to work, but when I start using state, I run into two problems:
value
parameter on the input to reference the state variable, it loses the connection to the label. (Looks like the id doesn't get rendered on the input.) Also, I can't change the value of the input by typing into it.on_change
to listen for changes and update the variable, compiling fails with the error:TypeError: Only Radix TextFieldRoot is allowed as child of FormControl
.It seems like I'm not grasping something about state and how it works, so I appreciate any help pointing me in the right direction.
I have this here on a repl and the code pasted below.
Beta Was this translation helpful? Give feedback.
All reactions