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

final-form-set-field-data

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

final-form-set-field-data

Mutator for setting arbitrary metadata on fields in 🏁 Final Form

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26K
increased by12.19%
Maintainers
1
Weekly downloads
 
Created
Source

🏁 Final Form Set Field Data

NPM Version NPM Downloads Build Status codecov.io styled with prettier

Mutator for setting arbitrary metadata for fields in 🏁 Final Form.


Installation

npm install --save final-form-set-field-data

or

yarn add final-form-set-field-data

Usage

import { createForm } from 'final-form'
import setFieldData from 'final-form-set-field-data'

// Create Form
const form = createForm({
  mutators: { setFieldData },
  onSubmit
})

form.mutators.setFieldData('firstName', { awesome: true })

form.registerField(
  'firstName',
  fieldState => {
    const { awesome } = fieldState.data // true
  },
  {
    // ...other subscription items
    data: true
  }
)

Mutator

form.mutators.setFieldData(name: string, values: Object) => void

Merges the values provided into the data value for the specified field

FAQs

Package last updated on 07 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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