Closed jturge0n closed 4 years ago
Hi, and thanks for your question.
Indeed, inputs and fields are not simple UI components and their values are populated by the framework from its datasource which depends on the context (Filter, List, Edit, etc.).
So first, we would need a lot more information to help you achieve what you want (which isn't clear) and second, this should happen on StackOverFlow as we only use Githug for tracking issues.
This makes your question easy to find by the core team, and the developer community. Unlike Github, StackOverFlow has great SEO, gamification, voting, and reputation. That's why we chose it, and decided to keep GitHub issues only for bugs and feature requests.
So I'm closing this issue, and inviting you to ask your question at:
http://stackoverflow.com/questions/tagged/react-admin
And once you get a response, please continue to hang out on the react-admin channel in StackOverflow. That way, you can help newcomers and share your expertise!
I've been trying to utilize a search bar component that we've built to populate a inside a component.
The way I'd like to do this is declare a state variable,
storeId
, that gets updated when the user searches using our search bar and then selects an option.I want to set the to equal the gets updated.
value
of thestoreId
state variable such that when thestateId
gets updated, the input value of theFor whatever reason, it seems impossible to do this in any way. I've tried using
options = {{ value: stateId }}
Can anyone tell me why the value input doesn't work to make a value equal to a local state variable?
Here's generally the code I have:
Environment