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.

Unable to get formvalue of a nested value inside a fieldarray using immutable-js

See original GitHub issue

I tried getting values using a formvalueselector for a value inside a fieldarray. I’m also using immutable-js.

The code I tried

(connect(
    (state,props) => ({
        test0: selector(state,"myfieldarray"),
        test1: selector(state,"myfieldarray[0]"),
        test2: selector(state,"myfieldarray[0].myvalue"),
        test3:selector(state,'another_value')
    })
)(MyForm)

The result:

test0: List: [{myvalue: 'test'}]
test1: Object: {myvalue:'test'}        // Will return a Map if you set the initial values as a Map
test2: undefined
test3: 'imanothervalue'

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Zombayacommented, Nov 24, 2016

It works as expected with my forn now as well.

No idea what changed, I did do a bunch of updates though. I will close this issue.

0reactions
lock[bot]commented, Jun 2, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to get formvalue of a nested value inside a ...
I tried getting values using a formvalueselector for a value inside a fieldarray. I'm also using immutable-js. The code I tried (connect( ...
Read more >
Getting nested values in Immutable.js
A map is simply a collection of keys with values. What you have is a map with the key categories , and the...
Read more >
FieldArray
A method to get all the values in the array. If you are using ImmutableJS, it will be an ImmutableJS List . fields.insert(index:Integer,...
Read more >
Setting Deeply Nested Value in Immutable.js
js I have to go through each property's ancestors before I have a new catalog object: var product = catalogImmutable.get("product"); var newProduct =...
Read more >
[Solved]-Is there any function to get form value in react-final ...
Coding example for the question Is there any function to get form value in react-final-form-Reactjs.
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