Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
final-form-arrays
Advanced tools
Readme
Mutators for updating array fields in 🏁 Final Form.
npm install --save final-form-arrays
or
yarn add final-form-arrays
import { createForm } from 'final-form'
import arrayMutators from 'final-form-arrays'
// Create Form
const form = createForm({
mutators: { ...arrayMutators },
onSubmit
})
// push
form.mutators.push('customers', { firstName: '', lastName: '' })
// pop
const customer = form.mutators.pop('customers')
form.mutators.insert(name: string, index:number, value: any) => undefined
form.mutators.move(name: string, from: number, to: number) => undefined
form.mutators.pop(name: string) => any
form.mutators.push(name: string, value: any) => void
form.mutators.remove(name: string, index: number) => any
form.mutators.shift(name: string) => any
form.mutators.swap(name: string, indexA: number, indexB: number) => void
form.mutators.unshift(name: string, value: any) => void
form.mutators.insert(name: string, index:number, value: any) => undefined
Inserts a value into the specified index of the array field.
form.mutators.move(name: string, from: number, to: number) => undefined
Moves a value from one index to another index in the array field.
form.mutators.pop(name: string) => any
Pops a value off the end of an array field. Returns the value.
form.mutators.push(name: string, value: any) => void
Pushes a value onto the end of an array field.
form.mutators.remove(name: string, index: number) => any
Removes a value from the specified index of the array field. Returns the removed value.
form.mutators.shift(name: string) => any
Removes a value from the beginning of the array field. Returns the value.
form.mutators.swap(name: string, indexA: number, indexB: number) => void
Swaps the position of two values in the array field.
form.mutators.unshift(name: string, value: any) => void
Inserts a value onto the beginning of the array field.
FAQs
Array Mutators for 🏁 Final Form
We found that final-form-arrays demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).