All Projects → final-form → react-final-form-listeners

final-form / react-final-form-listeners

Licence: MIT license
A collection of components to listen to 🏁 React Final Form fields

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-final-form-listeners

final-form-arrays
Array Mutators for 🏁 Final Form
Stars: ✭ 64 (-29.67%)
Mutual labels:  forms, form, final-form
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+178.02%)
Mutual labels:  components, forms, form
svelte-multistep-form
Svelte MultiStep Form like, this component is still in beta stage
Stars: ✭ 29 (-68.13%)
Mutual labels:  forms, form
aurelia-form
Fun with forms! Form utilities to make stuff just a bit (a lot) easier.
Stars: ✭ 34 (-62.64%)
Mutual labels:  forms, form
formurai
Lightweight and powerfull library for declarative form validation
Stars: ✭ 49 (-46.15%)
Mutual labels:  forms, form
FrontendForms
A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
Stars: ✭ 0 (-100%)
Mutual labels:  forms, form
ember-validity-modifier
Ember Octane addon to add custom validity (form validation) to form fields
Stars: ✭ 28 (-69.23%)
Mutual labels:  forms, form
p01contact
Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
Stars: ✭ 15 (-83.52%)
Mutual labels:  forms, form
React Workshop
⚒ 🚧 This is a workshop for learning how to build React Applications
Stars: ✭ 114 (+25.27%)
Mutual labels:  components, forms
vue-use-form
✅ A Vue.js composition API function to validate forms
Stars: ✭ 97 (+6.59%)
Mutual labels:  forms, form
SuluFormBundle
Form Bundle for handling Dynamic and Symfony Forms in https://sulu.io
Stars: ✭ 51 (-43.96%)
Mutual labels:  forms, form
contact-officials
Form definitions powering Resistbot's electronic deliveries to elected officials in the United States.
Stars: ✭ 29 (-68.13%)
Mutual labels:  forms, form
react-apollo-form
Build React forms based on GraphQL APIs.
Stars: ✭ 195 (+114.29%)
Mutual labels:  forms, form
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (-59.34%)
Mutual labels:  forms, form
Vue Form Components
Clean & minimal vue form elements and form builder with validation
Stars: ✭ 120 (+31.87%)
Mutual labels:  components, form
react-formulation
Simple React form validation
Stars: ✭ 14 (-84.62%)
Mutual labels:  forms, form
Uniforms
A React library for building forms from any schema.
Stars: ✭ 1,368 (+1403.3%)
Mutual labels:  components, forms
React Forms
React library for rendering forms.
Stars: ✭ 111 (+21.98%)
Mutual labels:  components, forms
react-search
This package will help you create a pretty good and beautiful search. And other related features
Stars: ✭ 17 (-81.32%)
Mutual labels:  forms, form
Forms
Tracking our progress moving all city paper and pdf forms online.
Stars: ✭ 14 (-84.62%)
Mutual labels:  forms, form

🏁 React Final Form Listeners

NPM Version NPM Downloads Build Status codecov.io


🏁 React Final Form Listeners is a collection of useful components for listening to fields in a 🏁 React Final Form.

Installation

npm install --save react-final-form-listeners react-final-form final-form

or

yarn add react-final-form-listeners react-final-form final-form

Usage

import { Form, Field } from 'react-final-form'
import { OnChange } from 'react-final-form-listeners'

const MyForm = () => (
  <Form
    onSubmit={onSubmit}
    render={({ handleSubmit, pristine, invalid }) => (
      <form onSubmit={handleSubmit}>
        <div>
          <label>
            <Field name="foo" component="input" type="checkbox" /> Turn foo on?
          </label>
          <OnChange name="foo">
            {(value, previous) => {
              // do something
            }}
          </OnChange>
        </div>
        ...
      </form>
    )}
  />
)

Table of Contents

Components

The following can be imported from react-final-form-listeners.

ExternallyChanged

Renders is render prop with a boolean flag when the specified field was last updated externally (changed while not active).

name : String

The name of the field to listen to.

children: (externallyChanged: boolean) => React.Node

A render prop given the boolean flag.

OnChange

Calls its children callback whenever the specified field changes. It renders nothing.

name : String

The name of the field to listen to.

children: (value: any, previous: any) => void

A function that will be called whenever the specified field is changed. It is passed the new value and the previous value.

OnFocus

Calls its children callback whenever the specified field becomes active. It renders nothing.

name : String

The name of the field to listen to.

children: () => void

A function that will be called whenever the specified field is changed. It is passed the new value and the previous value.

OnBlur

Calls its children callback whenever the specified field is blurred. It renders nothing.

name : String

The name of the field to listen to.

children: () => void

A function that will be called whenever the specified field is blurred.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].