Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🥢 feat: extra form values by form state#12936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
bluebill1049 wants to merge9 commits intomaster
base:master
Choose a base branch
Loading
fromfeat/getValues-options

Conversation

bluebill1049
Copy link
Member

@bluebill1049bluebill1049 commentedJul 5, 2025
edited
Loading

close#12931

getValues(undefined,{dirtyFields:true// touchedFields: true,})

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedJul 5, 2025
edited
Loading

Size Change: +505 B (+0.92%)

Total Size: 55.7 kB

FilenameSizeChange
dist/index.cjs.js11.1 kB+80 B (+0.73%)
dist/index.esm.mjs20.5 kB+162 B (+0.8%)
dist/index.umd.js11.2 kB+87 B (+0.79%)
dist/react-server.esm.mjs13 kB+176 B (+1.37%)

compressed-size-action

@bluebill1049bluebill1049 marked this pull request as draftJuly 5, 2025 02:36
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds support for returning extra form values based on form state (dirty or touched) via a newGetValuesConfig option.

  • IntroducesextractFormValues utility to filter values by state
  • AddsGetValuesConfig type and overloads toUseFormGetValues
  • IntegratesextractFormValues intocreateFormControl.getValues and updates tests & API report

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
src/utils/extractFormValues.tsNew helper to recursively extract form values based on state
src/types/form.tsDefinedEitherOption &GetValuesConfig, updatedgetValues overloads
src/logic/createFormControl.tsWiredGetValuesConfig intogetValues implementation
src/tests/utils/extractFormValues.test.tsAdded unit test forextractFormValues
reports/api-extractor.md.api.mdUpdated API extractor output for new types
package.jsonTweaked test script flags
Comments suppressed due to low confidence (3)

src/tests/utils/extractFormValues.test.ts:4

  • Consider adding a test for thedirtyFields path to ensureextractFormValues correctly filters values whendirtyFields is passed.
  it('should return extracted form values based on form state', () => {

src/types/form.ts:273

  • [nitpick]EitherOption may be ambiguous; consider renaming to something more descriptive likeExclusiveOption orOneOfOptions to clarify its purpose.
type EitherOption<T> = {

reports/api-extractor.md.api.md:367

  • The public typeGetValuesConfig relies onEitherOption, butEitherOption isn't exported from the entry point. Please add it to the package exports or adjust the API so no internal type is leaked.
// Warning: (ae-forgotten-export) The symbol "EitherOption" needs to be exported by the entry point index.d.ts

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

feature: Built-in form data extraction strategies
1 participant
@bluebill1049

[8]ページ先頭

©2009-2025 Movatter.jp