You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@leebyron Thanks for Immutable! I've checked out numerous Stack Overflow questions, tutorials, and blog posts but can't find an answer to this question, which feels like it should be simple to resolve. I have a deeply nested object that looks like this:
What I would like to do is change every selected value in this Immutable object to false. I've tried this to no avail:
let options = this.state.options
options.forEach((val, option) {
let option = option.get(option)
let falseOptions = options.setIn([option, "selected"], false)
})
this.setState({
options: falseOptions
})
This does not work as expected. Only the last object in the options object gets it's state changed. What is the best way to update multiple immutable values at once, and then pass those changes to the state?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
@leebyron Thanks for Immutable! I've checked out numerous Stack Overflow questions, tutorials, and blog posts but can't find an answer to this question, which feels like it should be simple to resolve. I have a deeply nested object that looks like this:
What I would like to do is change every selected value in this Immutable object to false. I've tried this to no avail:
This does not work as expected. Only the last object in the options object gets it's state changed. What is the best way to update multiple immutable values at once, and then pass those changes to the state?
Thanks in advance!
The text was updated successfully, but these errors were encountered: