{"id":28367887,"url":"https://github.com/final-form/final-form-set-field-data","last_synced_at":"2025-07-05T06:02:31.342Z","repository":{"id":27276889,"uuid":"113168590","full_name":"final-form/final-form-set-field-data","owner":"final-form","description":"Mutator for setting arbitrary metadata on fields in 🏁 Final Form","archived":false,"fork":false,"pushed_at":"2023-01-03T19:40:09.000Z","size":695,"stargazers_count":39,"open_issues_count":12,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T15:30:19.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/final-form.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"erikras","patreon":"erikras","open_collective":"final-form","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-12-05T10:37:06.000Z","updated_at":"2023-05-03T16:17:49.000Z","dependencies_parsed_at":"2023-01-14T06:21:55.018Z","dependency_job_id":null,"html_url":"https://github.com/final-form/final-form-set-field-data","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/final-form/final-form-set-field-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/final-form%2Ffinal-form-set-field-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/final-form%2Ffinal-form-set-field-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/final-form%2Ffinal-form-set-field-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/final-form%2Ffinal-form-set-field-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/final-form","download_url":"https://codeload.github.com/final-form/final-form-set-field-data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/final-form%2Ffinal-form-set-field-data/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260749853,"owners_count":23056842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-29T03:07:25.362Z","updated_at":"2025-06-21T19:31:33.972Z","avatar_url":"https://github.com/final-form.png","language":"JavaScript","funding_links":["https://github.com/sponsors/erikras","https://patreon.com/erikras","https://opencollective.com/final-form"],"categories":[],"sub_categories":[],"readme":"# 🏁 Final Form Set Field Data\n\n[![NPM Version](https://img.shields.io/npm/v/final-form-set-field-data.svg?style=flat)](https://www.npmjs.com/package/final-form-set-field-data)\n[![NPM Downloads](https://img.shields.io/npm/dm/final-form-set-field-data.svg?style=flat)](https://www.npmjs.com/package/final-form-set-field-data)\n[![Build Status](https://travis-ci.org/final-form/final-form-set-field-data.svg?branch=master)](https://travis-ci.org/final-form/final-form-set-field-data)\n[![codecov.io](https://codecov.io/gh/final-form/final-form-set-field-data/branch/master/graph/badge.svg)](https://codecov.io/gh/final-form/final-form-set-field-data)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\nMutator for setting arbitrary metadata for fields in\n[🏁 Final Form](https://github.com/final-form/final-form).\n\n---\n\n## Installation\n\n```bash\nnpm install --save final-form-set-field-data\n```\n\nor\n\n```bash\nyarn add final-form-set-field-data\n```\n\n## Usage\n\n```js\nimport { createForm } from 'final-form'\nimport setFieldData from 'final-form-set-field-data'\n\n// Create Form\nconst form = createForm({\n  mutators: { setFieldData },\n  onSubmit\n})\n\nform.mutators.setFieldData('firstName', { awesome: true })\n\nform.registerField(\n  'firstName',\n  fieldState =\u003e {\n    const { awesome } = fieldState.data // true\n  },\n  {\n    // ...other subscription items\n    data: true\n  }\n)\n```\n\n## Mutator\n\n### `form.mutators.setFieldData(name: string, values: Object) =\u003e void`\n\nMerges the values provided into the `data` value for the specified field\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinal-form%2Ffinal-form-set-field-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinal-form%2Ffinal-form-set-field-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinal-form%2Ffinal-form-set-field-data/lists"}