Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle numeric keys as array index only if parent is an array #993

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

Balastrong
Copy link
Member

Fixes #985

Copy link

nx-cloud bot commented Oct 24, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e0154b3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Oct 24, 2024

Open in Stackblitz

More templates

@tanstack/angular-form

pnpm add https://pkg.pr.new/@tanstack/angular-form@993

@tanstack/lit-form

pnpm add https://pkg.pr.new/@tanstack/lit-form@993

@tanstack/react-form

pnpm add https://pkg.pr.new/@tanstack/react-form@993

@tanstack/solid-form

pnpm add https://pkg.pr.new/@tanstack/solid-form@993

@tanstack/vue-form

pnpm add https://pkg.pr.new/@tanstack/vue-form@993

@tanstack/valibot-form-adapter

pnpm add https://pkg.pr.new/@tanstack/valibot-form-adapter@993

@tanstack/yup-form-adapter

pnpm add https://pkg.pr.new/@tanstack/yup-form-adapter@993

@tanstack/zod-form-adapter

pnpm add https://pkg.pr.new/@tanstack/zod-form-adapter@993

@tanstack/form-core

pnpm add https://pkg.pr.new/@tanstack/form-core@993

commit: e0154b3

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.45%. Comparing base (5473bb8) to head (e0154b3).
Report is 175 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #993      +/-   ##
==========================================
- Coverage   91.55%   88.45%   -3.11%     
==========================================
  Files          21       26       +5     
  Lines         900     1074     +174     
  Branches      206      265      +59     
==========================================
+ Hits          824      950     +126     
- Misses         71      115      +44     
- Partials        5        9       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Balastrong
Copy link
Member Author

@maksymskuibida can you please validate that this fix works in your project?

You can try the version of this PR with

yarn add https://pkg.pr.new/@tanstack/react-form@993

@maksymskuibida
Copy link

@maksymskuibida can you please validate that this fix works in your project?

You can try the version of this PR with

yarn add https://pkg.pr.new/@tanstack/react-form@993

I am sorry for late response. I just tested and it does not work. The same as it was before

@Balastrong
Copy link
Member Author

@maksymskuibida on the code sandbox you provided it seems to be working (make sure to stop the dev server and run yarn dev again after installing the package)
I tried to fork the demo here.

If you have a more complete example where it's still broken please share it so I can give it another try :D

Copy link
Member

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

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

If tests are passing, let's merge this. Don't let perfect be the enemy of better :)

@Balastrong Balastrong merged commit a4e76c8 into TanStack:main Nov 25, 2024
6 of 7 checks passed
@Balastrong Balastrong deleted the fix/numeric-object-key branch November 25, 2024 21:09
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.

Record fields with numbers as keys does not work as excpected
3 participants