Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/form-core

Package Overview
Dependencies
Maintainers
2
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/form-core - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

10

build/legacy/FormApi.js

@@ -303,6 +303,8 @@ // src/FormApi.ts

this.deleteField = (field) => {
const newState = { ...this.state };
delete newState.values[field];
delete newState.fieldMeta[field];
this.store.setState((_) => newState);
this.store.setState((prev) => {
const newState = { ...prev };
delete newState.values[field];
delete newState.fieldMeta[field];
return newState;
});
};

@@ -309,0 +311,0 @@ this.pushFieldValue = (field, value, opts) => {

@@ -297,6 +297,8 @@ // src/FormApi.ts

this.deleteField = (field) => {
const newState = { ...this.state };
delete newState.values[field];
delete newState.fieldMeta[field];
this.store.setState((_) => newState);
this.store.setState((prev) => {
const newState = { ...prev };
delete newState.values[field];
delete newState.fieldMeta[field];
return newState;
});
};

@@ -303,0 +305,0 @@ this.pushFieldValue = (field, value, opts) => {

2

package.json
{
"name": "@tanstack/form-core",
"version": "0.8.1",
"version": "0.8.2",
"description": "Powerful, type-safe, framework agnostic forms.",

@@ -5,0 +5,0 @@ "author": "tannerlinsley",

@@ -554,7 +554,8 @@ import { Store } from '@tanstack/store'

deleteField = <TField extends DeepKeys<TFormData>>(field: TField) => {
const newState = { ...this.state }
delete newState.values[field as keyof TFormData]
delete newState.fieldMeta[field]
this.store.setState((_) => newState)
this.store.setState((prev) => {
const newState = { ...prev }
delete newState.values[field as keyof TFormData]
delete newState.fieldMeta[field]
return newState
})
}

@@ -561,0 +562,0 @@

@@ -614,3 +614,5 @@ import { expect, vitest } from 'vitest'

expect(form.state.fieldMeta.name).toBeUndefined()
expect(form.store.state.values.name).toBeUndefined()
expect(form.store.state.fieldMeta.name).toBeUndefined()
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc