question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot call setIn() with undefined key

See original GitHub issue

Scope - Form Renderer

Description

I was trying to include select with autocomplete component using material autocomplete. However, after including the above in the project I started getting the error Cannot call setIn() with undefined key on input change. Can someone please help me out here?

Schema

Attaching the schema for the same. https://stackblitz.com/edit/g5ghky-78chnl?file=index.js

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jinxaccommented, Dec 2, 2020

@Hyperkid123 oh shucks, I did not see the import. Thank you so much.

0reactions
Hyperkid123commented, Dec 2, 2020

@jinxac and that seem to be the issue. Look at this example, after selecting an option and pressing the submit, the correct value is shown in the browser console: https://stackblitz.com/edit/g5ghky-x637g8?file=index.js

The example is not controlled and does not use the form state value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

support Field without name · Issue #535 · final-form/react-final ...
Uncaught Error : Cannot call setIn() with undefined key at setIn (final-form.es.js:162) at Field.unsubscribe (final-form.es.js:1062) at Field ...
Read more >
react-final-form - setError using setIn - CodeSandbox
An example of how to use setIn to convert from flat field names like `nested.field.name` into nested error object like {nested: {field: {name:...
Read more >
How to make setIn set a number key instead of array in ...
It seems to be turning it into an Array object instead of an Object and inserting undefined values. What gives? Any advice is...
Read more >
Top 5 final-form Code Examples - Snyk
Learn more about how to use final-form, based on final-form code examples created from the most popular ways it is used in public...
Read more >
Final Form Docs – FAQ
Note that you cannot just call submit() , as this will not trigger ... This is because the setIn engine in Final Form...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found