Skip to content

docs: remove nonexistent setFormError and duplicate setValues from FormApi reference - #494

Open
ZayanKhan-12 wants to merge 1 commit into
teslamotors:masterfrom
ZayanKhan-12:fix-formapi-docs
Open

docs: remove nonexistent setFormError and duplicate setValues from FormApi reference#494
ZayanKhan-12 wants to merge 1 commit into
teslamotors:masterfrom
ZayanKhan-12:fix-formapi-docs

Conversation

@ZayanKhan-12

Copy link
Copy Markdown

Two fixes to the FormApi reference page (vitedocs/Pages/ApiReference/FormApi/FormApi.jsx), which is routed live at /formApi:

  1. setFormError doesn't exist. It's documented with an example (setFormError('There was an error!')), but it's not on the formApi object in FormController.js, not in the FormApi type in index.d.ts, and not referenced by any test (grep -rn setFormError src/ index.d.ts __tests__ → zero hits). Removed the row.

  2. setValues is documented twice with different descriptions. The implementation iterates all registered fields and sets each from the given object — i.e. it clears fields you don't include — which matches the retained row. The removed duplicate described it as a per-field setter (setValues({ greeting: 'hello'}) / "set the fields values"), which better describes setTheseValues, documented just below.

🤖 Generated with Claude Code

…rmApi reference

The FormApi reference documented setFormError, which does not exist:
it is not on the formApi object in FormController.js, not in the
FormApi type in index.d.ts, and not referenced by any test.

setValues was also documented twice with different descriptions. The
implementation iterates all registered fields and sets each from the
given object (clearing fields you don't include), which is what the
retained row says; the removed row described it as a per-field
setter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant