docs: add guide for getting and setting field values#2116
docs: add guide for getting and setting field values#2116Vitalini wants to merge 1 commit intoTanStack:mainfrom
Conversation
Adds a new React guide covering: - Initializing forms with defaultValues (including async/API) - Getting field values via form API, field API, and reactively - Setting field values (single, batched, nested, arrays) - Whether setFieldValue triggers validation (and opts to disable it) - Listening for value changes Fixes TanStack#478
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new documentation guide is added to the React framework section covering initialization, retrieval, and updates of form field values in TanStack Form. The configuration file is updated to include the new guide in the navigation menu. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #478
Adds a new React guide page at
docs/framework/react/guides/field-values.mdcovering the topics requested in the issue:defaultValuesform.getFieldValue,form.state.values,field.state.value)form.useStore,form.Subscribe)form.setFieldValue, updater functions, nested paths,field.setValue)form.reset)setFieldValuetriggers validation, and how to disable it (dontUpdateMeta,dontValidate) and trigger it manually (form.validateField)pushFieldValue,insertFieldValue,removeFieldValue, etc.)listenersprop,form.useStore)Also adds the new guide to
docs/config.jsonunder the React Guides section.Summary by CodeRabbit