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

final-form-set-field-touched

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

final-form-set-field-touched

Mutator for setting a field as "touched" in 🏁 Final Form

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

🏁 Final Form Set Field Touched

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

Mutator for setting a field as "touched" in 🏁 Final Form.


Installation

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

or

yarn add final-form-set-field-touched

Usage

import { createForm } from 'final-form'
import setFieldTouched from 'final-form-set-field-touched'

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

form.mutators.setFieldTouched('firstName', true)

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

Mutator

form.mutators.setFieldTouched(name: string, touched: boolean) => void

Sets the specified field's touched flag to the boolean value provided.

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