How to set an inital value for a dropdown in a listener
When you reset a dropdown like here https://tanstack.com/form/latest/docs/framework/react/guides/listeners
say you select a model provider, openai, you select 4o in the model, then you decide you want 3.5 sonnet instead, so you go with anthropic from the provider dropdown, the model dropdown is filled with the claude models and you go with 3.5.
At the moment I'm resetting the model dropdown to blank, but I'm wondering if you can give it an inital value for each provider. Not figured it out yet.
Side effects for event triggers | TanStack Form React Docs
For situations where you want to "affect" or "react" to triggers, there's the listener API. For example, if you, as the developer, want to reset a form field as a result of another field changing, you...
0 Replies