MCPcopy
hub / github.com/final-form/final-form / changeValue

Function changeValue

src/FinalForm.ts:247–251  ·  view source on GitHub ↗
(state, name, mutate)

Source from the content-addressed store, hash-verified

245 };
246
247 const changeValue: ChangeValue<FormValues, InitialFormValues> = (state, name, mutate) => {
248 const before = getIn(state.formState.values as object, name);
249 const after = mutate(before);
250 state.formState.values = (setIn(state.formState.values as object, name, after) || {}) as FormValues;
251 };
252 const renameField: RenameField<FormValues, InitialFormValues> = (state, from, to) => {
253 if (state.fields[from]) {
254 state.fields = Object.assign(Object.create(null), state.fields, {

Callers 4

setValueFunction · 0.85
createFormFunction · 0.85

Calls 2

getInFunction · 0.85
setInFunction · 0.85

Tested by 1

setValueFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…