Skip to content

feat(react-form): preserve inline edit lifecycle and validation updates - #256

Merged
andrewzolotukhin merged 2 commits into
developmentfrom
feat/react-form-blur-lifecycle
Oct 18, 2026
Merged

andrewzolotukhin merged 2 commits into
developmentfrom
feat/react-form-blur-lifecycle

Conversation

@andrewzolotukhin

@andrewzolotukhin andrewzolotukhin commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Original request

Support blur validation and rejected inline edits in the headless form package, with no imposed UI or changes to existing defaults.

What changed

  • Add opt-in validateOnBlur: immediately validate current values, cancel pending debounce, and touch only the blurred field.
  • Add awaitable FormSubmitOptions.onInvalid(result) inside the managed submission lock.
  • Add opt-in refreshValidationRules for changed bounds/messages with a fixed field model. Preserve raw values, baselines, dirty/touched state and suppress stale validation/submission callbacks.
  • Suppress stale invalid callbacks after edits, reset or unmount; callback exceptions propagate without being translated as failed writes.
  • Add lifecycle regressions, public type assertions, JSDoc, README examples and a minor changeset.

Reasoning

Applications can retain their existing controls and decide whether rejected inline edits restore a saved baseline. The package owns validation timing, duplicate protection and stale-result handling. Both additions are optional, preserving existing behavior.

Blog post

Skipped: internal headless lifecycle integration. Public contracts are documented in the package README and JSDoc.

Screenshots / preview evidence

No visual surface or configured preview is changed by this library PR. DOM/hook tests verify behavior without a UI dependency; consumer visual acceptance is separate.

Validation

  • npm run lint: pass.
  • npm run build: all 24 package builds pass.
  • npm run test: 5,396 tests across 303 files pass; no type errors.
  • The full rerun includes blur, invalid-submit and rule-refresh DOM/hook regressions and public API type assertions.
  • Current candidate includes the rule-refresh follow-up; CI must pass on the latest head before merge/publication.
  • No application telemetry is applicable to this library-only PR.

@andrewzolotukhin andrewzolotukhin changed the title feat(react-form): add opt-in blur validation and invalid submission callbacks feat(react-form): preserve inline edit lifecycle and validation updates Oct 18, 2026
@andrewzolotukhin
andrewzolotukhin merged commit c052e04 into development Oct 18, 2026
5 checks passed
@andrewzolotukhin
andrewzolotukhin deleted the feat/react-form-blur-lifecycle branch October 18, 2026 10:45
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